JDK 17 jshell not working with Unicode on Linux

Cay Horstmann cay at horstmann.com
Fri May 14 18:27:45 UTC 2021


Hi, I am having grief with JDK 17 jshell when trying to paste Unicode 
characters in Linux.

For example, in JDK 11 jshell, I can paste a ﹏ (U+FE4F) into a terminal 
running JShell, and demonstrate, to the amazement of stunned onlookers, 
that it's a valid variable name:

~$ jshell
|  Welcome to JShell -- Version 11.0.4
|  For an introduction type: /help intro

jshell> var ﹏ = 0
﹏ ==> 0

But in JDK 17 (build 17-ea+21-1866), the pasting doesn't work.

~$ jshell
|  Welcome to JShell -- Version 17-ea
|  For an introduction type: /help intro

jshell> var �� = 0

Here, I pasted ﹏ into the terminal, just like I did with JShell 11, and 
instead of ﹏ I got ��.

Cheers,

Cay


-- 

Cay S. Horstmann | http://horstmann.com | mailto:cay at horstmann.com


More information about the kulla-dev mailing list