Open Qinggao1729 opened 1 year ago
Interesting, thank you! :)
Could you try using the -DFile.Encoding=UTF-8
argument in the plugin settings?
No, it doesn't work.
I think the issue is similar to this: https://stackoverflow.com/questions/28567208/how-can-i-change-the-standard-out-to-utf-8-in-java
The output stream is differently encoded than the text in Obsidian. Maybe we need to solve this globally by changing the encoding of every character before adding it to the output block in Obsidian.
I think the issue is similar to this: https://stackoverflow.com/questions/28567208/how-can-i-change-the-standard-out-to-utf-8-in-java
The output stream is differently encoded than the text in Obsidian. Maybe we need to solve this globally by changing the encoding of every character before adding it to the output block in Obsidian.
Sorry, I don't understand. I want to change it to display the error message. Can it work too?
I see: it's not just the java std streams, but the javac
ones too.
Would you mind entering the following command & sending a screenshot of the output? This will help get a grasp on the encoding that your system uses.
javac HelloWorld.java 2> /dev/stdout | xxd
I see: it's not just the java std streams, but the
javac
ones too.Would you mind entering the following command & sending a screenshot of the output? This will help get a grasp on the encoding that your system uses.
javac HelloWorld.java 2> /dev/stdout | xxd
It prints nothing.
(I'm running Git Bash on windows11. Also, my system language is Chinese.)
Not sure if this is relevant: the error messages displayed on my IntelliJ was also Chinese originally, but I followed the instruction here to change it to English: https://stackoverflow.com/a/47529952/21070222
My system language is Chinese, so if I run java file in windows terminal, it will display Chinese. But when I run it in obsidian, the Chinese characters can't be displayed normally.
I know there's a similar issue here #126 about printing Chinese characters, but my case is about displaying error messages. Is there any way to solve the issue?
Edit: I'm running Git Bash on windows11. Also, my system language is Chinese.