Monday, September 8, 2008

How to set up an Eclipse console for multilingual support


  1. In your code insert the following:

Locale loc = new Locale("ko", "KR");

Locale.setDefault(loc);

In this example I created an instance of Korean Locale, for the sake of example. Second line means, set Korean Locale as default. After those lines of code you can put your business logic.

To get the Eclipse console to display characters in an encoding other than your system default encoding, you need to do the following:

  1. Set the file encoding on the target VM in the Arguments Tab of the Run? dialog ("-Dfile.encoding=UTF-8").

  1. Set the console encoding to match the encoding you set on the target VM in the Common tab of the Run? dialog.

  • Open Run Dialog ...








  • Type "-Dfile.encoding=UTF-8" in the VM arguments















  • Select UTF-8 in the Common tab











That's it. Enjoy.