Java Cookbook
Viewing Unicode characters in the Eclipse console.
Problem:
You want to display Japanese, Chinese, or other Unicode characters in the Eclipse console.
Solution:
By default the eclipse console does not handle Unicode. All Unicode characters in the Eclipse console are replaced by question marks. Luckily it is a simple matter to get Unicode characters to display. You will need to make two simple modifications to the run dialog.
- Open the Run Dialog.
- Click on the second tab, "Arguments"
- Enter "-Dfile.encoding=UTF-8" in the second text area title VM arguments.
- Click on the "Common" tab.
- Click on "Other" under "Console Encoding"
- Select "UTF-8" from the drop down.
- Apply and run.
If you are testing any of these recipes in Eclipse and the characters are not displaying correctly in your console visit http://i18ncookbook.com/eclipse_settings.
This site is ad supported. I hope you find something among our sponsors worth clicking. ;)
i18n search
Custom Search