Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

JShell encoding in DOS/Windows

jkostaras-JavaNetNov 23 2019 — edited Feb 22 2020

Hallo,

I was wondering if anybody has encountered the issue of using non-english letters in jshell on windows. On linux or mac jshell behaves correctly.

In a DOS window, I try to enter Greek letters, e.g.:

jshell> var s = "Γειά"

but I can only see

jshell> var s = "????"

I thought that it has to do with the locale or character set.

DOS> chcp

437

so I changed it to UTF-8

DOS> chcp

65001

hoping that this would fix the problem, but alas. Please note that in DOS (outside of jshell) I can type Greek letters without an issue.

Even the JShell from inside NetBeans:

[1]-> String s = "Γειά σου";

|  s ==> "???? ???"

So I was wondering if there is some way to set the encoding in JShell itself.

Please note that this behaviour exists only on JShell on Windows. The OS locale has been changed to support the Greek language. However, JShell doesn't want to comply.

Any suggestions are highly appreciated.

Regards,

John.

Comments

Post Details

Added on Nov 23 2019
3 comments
1,253 views