On Mon, 4 Oct 2021 10:24:01 GMT, Jan Lahoda <jlah...@openjdk.org> wrote:

>> 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 ?
>
> @takiguc - if JShell is still an issue, is there a chance you could try this:
> https://github.com/lahodaj/jdk/commit/cfa6b3eebbc22c5a48d31cfd692ff98690653686
> 
> Not sure if it will help, but it might (this won't change the default 
> charset, but could send the output in a sensible encoding for the console.
> 
> Thanks!

Thanks, @lahodaj .
I opened [JDK-8274784](https://bugs.openjdk.java.net/browse/JDK-8274784).

I tested your code, it worked fine on standard case !
Many thanks.

But, to execute previous saved command list, user needs to specify 
-J-Dfile.encoding=COMPAT and -R-Dfile.encoding=COMPAT options.
Do you have any idea about this kind of case ?

I'd like to discuss jshell things by 
[JDK-8274784](https://bugs.openjdk.java.net/browse/JDK-8274784).

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

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

Reply via email to