Integrated: 8356245: stdin.encoding and stdout.encoding in jshell don't respect console code pages
Jan Lahoda
jlahoda at openjdk.org
Tue May 27 09:51:58 UTC 2025
On Tue, 20 May 2025 13:28:27 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:
> JShell, by default, uses two processes: the main one which compiles snippets, and a remote, that runs them.
>
> The remote process is not connected to console, and hence its in/out/err encoding will be derived from the platform encoding, while the main process will use encoding derived from the console settings.
>
> This PR proposes to pass the stdin/out/err encoding from the main process to the remote process. It also has to change the char->byte conversion for System.in to use the `stdin.encoding`, so that the remote process understands it.
>
> The `InputUITest` requires explicitly setting encoding, as the tests sometimes run with the ASCII encoding, but use Unicode characters, and fail, as the ASCII encoding is not really followed by JShell now.
This pull request has now been integrated.
Changeset: 9c191cc0
Author: Jan Lahoda <jlahoda at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/9c191cc0fad4e2cd8ac021082acc494dc7503745
Stats: 34 lines in 3 files changed: 19 ins; 2 del; 13 mod
8356245: stdin.encoding and stdout.encoding in jshell don't respect console code pages
Reviewed-by: asotona, cstein, liach
-------------
PR: https://git.openjdk.org/jdk/pull/25328
More information about the kulla-dev
mailing list