I have a problem with encoding of Java System Output occurring only in Visual Studio Code.
My program is very simple:
public class Main {
public static void main(final String[] args) {
System.out.println("Příliš žluťoučký kůň úpěl ďábelské ódy");
}
}
but the output looks like this:
Příliš žluťoučký kůň úpěl ďábelské ódy�ábelské ódy�dy
My file has the UTF-8 encoding and it's being compiled with -Dfile.encoding=UTF-8 flag. I am using the official Java Extension Pack by Microsoft in Visual Studio Code.
for code runner extention,just add this code to user setting json:
"code-runner.executorMap":{"java": "cd $dir && javac -encoding utf-8 $fileName && java $fileNameWithoutExt",},
"code-runner.runInTerminal": true,
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With