i am converting a project from Ant to Maven and i\'m having problems with a specific unit test which deals with UTF-8 characters. The problem is about the following String:<
Your problem is not the encoding of the source file (and therefore the String inside your class file) but the Problem is the encoding of System.out
's implicite PrintStream
. It uses file.encoding
which represents the System encoding, and this is in Windows the ANSI codepage.
You would have to set up a PrintWriter
with the OEM code page (or you use the class which is intended for this: Console).
See also various bugs around this in: http://bugs.java.com/bugdatabase/view_bug.do?bug_id=4153167