You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We tried to delete some multi-bytes characters such as Chinese or Japanese in jline, and four characters(either double-byte or single-byte character) are deleted when pressing backspace key the first time and then one-byte is deleted when clicking backspace key.
Ideally, one character, no matter double-byte or single-byte character, is deleted when pressing backspace key once.
This happens on both Windows and CentOS.
Jun
The text was updated successfully, but these errors were encountered:
scala>"hi".getBytes
res0:Array[Byte] =Array(104, 105)
scala>"안녕".getBytes
res1:Array[Byte] =Array(-20, -107, -120, -21, -123, -107)
scala>"안녕".getChars
<console>:8:error: value getByChars is not a member of String"안녕".getByChars
Notice that the error output at the end does not match the input I gave the shell. My input reads .getChars, but the shell is complaining about a .getByChars. How did that happen?
After res1, I hit the up arrow in the shell and then backspaced 5 times to edit the line to say "안녕".getChars instead of "안녕".getBytes. It looks like the Korean characters in there somehow messed up the input buffer, and I did not actually delete all the characters I thought I had deleted. So what I saw on the input line at the end was not what the shell received.
Hello,
We tried to delete some multi-bytes characters such as Chinese or Japanese in jline, and four characters(either double-byte or single-byte character) are deleted when pressing backspace key the first time and then one-byte is deleted when clicking backspace key.
Ideally, one character, no matter double-byte or single-byte character, is deleted when pressing backspace key once.
This happens on both Windows and CentOS.
Jun
The text was updated successfully, but these errors were encountered: