RFR: 8356985: Use "stdin.encoding" in Console's read*() methods [v5]
Alan Bateman
alanb at openjdk.org
Mon May 26 07:22:49 UTC 2025
On Thu, 22 May 2025 17:46:33 GMT, Naoto Sato <naoto at openjdk.org> wrote:
>> `java.io.Console` uses the charset specified by the `stdout.encoding` system property for both input and output. While this is generally sufficient, since Console is intended for interactive terminal use, some platforms allow different encodings to be configured for input and output. In such cases, using a single encoding may lead to incorrect behavior when reading from the terminal. To address this, the newly introduced system property, `stdin.encoding`, should be used specifically for input where appropriate.
>
> Naoto Sato has updated the pull request incrementally with one additional commit since the last revision:
>
> Reflects wording change suggestions
Spec update and src changes looks good.
I only skimmed through the test changes (not a detailed review) and they look reasonable. I assume you've done some "test repeat" jobs to ensure that any variance in the version of "expect" on test machines doesn't cause any issues.
-------------
Marked as reviewed by alanb (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/25271#pullrequestreview-2867506507
More information about the kulla-dev
mailing list