Non-ASCII chars in Java

If you are having problems with non-ASCII characters (for example the Danish æ, ø and å) not showing up correctly in your Java application, try giving the Java VM the following argument:

-Dfile.encoding=UTF-8

You can verify that the charset has been set with this statement:

Charset.defaultCharset();