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
On the simplified Chinese version of windows, when you enter Chinese, you will get chaotic strings. I tried chcp 65001 / -Dfile.encoding=utf8 / encoding("utf8") and other methods, but they didn't solve the problem, or even got worse.
The problem only occurs on CMD and PowerShell of windows, and there is no problem in Linux or IDEA console.
My code is like this
Terminal terminal = TerminalBuilder.builder().encoding("gbk").build();
LineReader lineReader = LineReaderBuilder.builder().terminal(terminal).build();
while (true) {
String line = lineReader.readLine(">");
System.out.println(line);
}
It's not just input. If you change the above ">" to Chinese, it will also print "?????" or garbled.
Thank you.
The text was updated successfully, but these errors were encountered:
If I use the encoding("utf8") method, Chinese will become ???, and ??? is a common garbled content when reading a gbk encoded file with utf8. But I tried all kinds of methods, but they didn't solve the problem.
On the simplified Chinese version of windows, when you enter Chinese, you will get chaotic strings. I tried
chcp 65001
/-Dfile.encoding=utf8
/encoding("utf8")
and other methods, but they didn't solve the problem, or even got worse.The problem only occurs on CMD and PowerShell of windows, and there is no problem in Linux or IDEA console.
My code is like this
It's not just input. If you change the above ">" to Chinese, it will also print "?????" or garbled.
Thank you.
The text was updated successfully, but these errors were encountered: