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

Ichiroh Takiguchi itakiguchi at openjdk.java.net
Mon Oct 4 08:50:12 UTC 2021


On Fri, 1 Oct 2021 18:14:11 GMT, Naoto Sato <naoto 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.
>
> The encoding used in `Log.java` should first check whether it is run within console or not. If `System.console()` returns the console, its `.charset()` should be used instead of `native.encoding` value.
> As to the jshell issue, it is a different issue than javac, so I would expect it to be handled with a different issue.

Helllo @naotoj .
I used `System.console()` and `Console.charset()`.

The following executables had same issue, I fixed them.
> jar.exe, javac.exe, javadoc.exe, javap.exe, jdeps.exe, jlink.exe, jmod.exe, jpackage.exe

I could not find out the following executables had same issue or not
> jabswitch.exe, jcmd.exe, jfr.exe, jhsdb.exe, jimage.exe, jinfo.exe, jmap.exe, jps.exe, jrunscript.exe, jstack.exe, jstat.exe, jstatd.exe, kinit.exe, klist.exe, ktab.exe

The following executables worked fine.
> jarsigner.exe, java.exe, javaw.exe, jdb.exe, jdeprscan.exe, jshell.exe, keytool.exe, rmiregistry.exe, serialver.exe

The following executables were GUI apps
> jaccessinspector.exe, jaccesswalker.exe, jconsole.exe

These fixes don't have testcases.
Do you have any idea about testcase for this issue ?

-------------

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


More information about the i18n-dev mailing list