<i18n dev> RFR: 8274544: Langtools command's usage were grabled on Japanese Windows

Jan Lahoda jlahoda at openjdk.java.net
Fri Oct 1 11:59:32 UTC 2021

On Thu, 30 Sep 2021 09:36:34 GMT, Ichiroh Takiguchi <itakiguchi at openjdk.org> wrote:

> JEP-400 (UTF-8 by Default) was eabled on JDK18-b13.
> After JDK18-b13, javac and some other langtool command's usage were garbled on Japanese Windows.
> These commands use PrintWriter instead of standard out/err with PrintStream.

Regarding javac, the patch to `Log.java` seems to be in a reasonable direction: the write is to the physical `System.out/err` which should be done(?) using the native encoding. The order of the changed lines should be fixed, so that the javadoc is kept above the `initWriters` method. (As a secondary comment, it maybe a matter of discussion on whether keeping the native encoding in a static field is warranted here, but I don't mind it much.)

Regarding JShell, I guess I need to try to find a way to reproduce for me, so that I can debug. AFAIK the main process does not read/write from/to the console using `System.in`/`System.out`, so encoding plays no real role for the console, but it plays role in the communication between the agent and the main process.


PR: https://git.openjdk.java.net/jdk/pull/5771

More information about the i18n-dev mailing list