Some compilers failed on non-ASCII characters in JavaDoc and source code comments. What is the current (Java 7) and future (Java 8 and beyond) practices with respect to Unic
As commenters indicated, the encoding of the source files can be passed to (at least some) compilers. In this answer, I will summarize how to pass this information.
Eclipse
Eclipse (3.7 checked) does not require any special configuration, and you can happily use Java source code like:
double π = Math.PI;
Ant
Java
javac -encoding UTF-8 src/main/Foo.java