If you use the Eclipse launch configuration to run your code, you need to set the character encoding in the console dialog box. You can do this (I'm checking Indigo, I'm not sure about earlier versions) by creating Run Configurations, selecting the given Java execution command, clicking on the Common tab, and on the right is the way to choose console character encoding (which is very important for UTF8 for your program )
I found this by typing "encoding for console" in the search help dialog box.
Kathy van stone
source share