Sometimes you may need to tell the Java compiler about the character encoding of the source files. For example, if an ISO-8859-1 encoded source file is compiled in a UTF-8 environment, any funny (non-ASCII) characters may become a problem.
This is an example of how you can tell Sun's javac about the source file encoding:
(Without the encoding switch, javac uses your system's default encoding.)
javac -encoding iso8859-1 <FILE PATH(s)>
This way, you can tell Sun's JVM to expect UTF-8 IO:
java -Dfile.encoding=utf8
No comments:
Post a Comment