JDK-8274784 : jshell: Garbled character was displayed by System.out.println(...) on Japanese Windows
  • Type: Bug
  • Component: tools
  • Sub-Component: jshell
  • Affected Version: 18
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows
  • CPU: generic
  • Submitted: 2021-10-05
  • Updated: 2021-12-02
  • Resolved: 2021-11-29
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 18
18 b26Fixed
Related Reports
Relates :  
Relates :  
Description
JEP-400 was implemented by JDK18-b13.
After JDK18-b13, garbled character was displayed by following code on Japanese Windows' command prompt.

System.out.println("\u3042")

Japanese "A" should be displayed, but garbled character was displayed.
See jshell-image01.png

Also saved jshell command list did not work as expected if Japanese character was there.
See jshell-image02.png

Following issue has some information
8274544: Langtools command's usage were garbled on Japanese Windows #5771 
https://github.com/openjdk/jdk/pull/5771
Comments
Changeset: 8f9eb620 Author: Ichiroh Takiguchi <itakiguchi@openjdk.org> Date: 2021-11-29 00:11:28 +0000 URL: https://git.openjdk.java.net/jdk/commit/8f9eb620acbc447cf9124b1fe5574a9f02115f45
29-11-2021

I assume this will go away once the tools are updated via JDK-8274544.
05-10-2021