On Thu, 22 May 2025 16:15:56 GMT, Stuart Marks <sma...@openjdk.org> wrote:
>> Good point. Brought the same wording to the `charset()` method description >> for further clarification. > > I'm confused by the actual behavior here. What might be helpful is to divide > the discussion between a) what charsets get used for input and output, and b) > the return value of the `charset()` method. > > I'm not entirely sure, but since `stdin.encoding` and `stdout.encoding` are > always set to something -- whether it comes from the platform or the command > line -- won't Console just use `stdin.encoding` for input and > `stdout.encoding` for output? If this is true, maybe just say this instead of > deferring to the `charset()` method. I think I agree with Stuart and it would be better to say that stdin.encoding is used for reading, and stdout.encoding for writing. They are usually the same but if they differ then Console will return the charset for output. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/25271#discussion_r2102987344