Java: How to detect (and change?) encoding of System.console?

Try the following command-line argument when starting your application:

-Dfile.encoding=utf-8

This changes the default encoding of the JVM for I/O operations.

You can also try:

System.setOut(new PrintStream(System.out, true, "utf-8"));

Leave a Comment