Eclipse console output in Unicode

If you know me, you know I love Eclipse. But sometimes Eclipse needs a little nudge. If you ever needed to view the CJK (Chinese, Japanese or Korean) languages in the console, you know what I mean.
My current project supports those three and ten other languages. Needless to say my UTF-8-fu has become very strong.

Here are the steps to get Eclipse’s console to display text in UTF-8.

  1. Go to Eclipse > Preferences > General > Appearance > Colors & Fonts > Debug > Console font
    • choose a Unicode font, like Lucinda Grande
  2. View the Tomcat server overview page (double-click on the name in the Servers tab).
    • Click the “Open launch configuration” link
    • Choose the Arguments tab, add  -Dfile.encoding=UTF-8 to the VM arguments text field.
    • Choose the Common tab, select the “Other” Console Encoding radio button, and choose “UTF-8″.
  3. Select the Eclipse application, in the Finder. Right-click and choose “Show Package Contents”.
    • in Contents/MacOS/eclipse.ini, add -Dfile.encoding=UTF-8 to the bottom of the file.

Here’s what the final product looks like. Without the steps above, all of the Japanese characters in the image will appear as question marks (?????).