How to display chinese character in Eclipse console

By default, Eclipse will output Chinese or non-English characters as question marks (?) or some weird characters. This is because the Eclipse’s default console encoding is Cp1252 or ASCII, which is unable to display other non-English words.

To enable Eclipse to display Chinese or other non-English characters correctly, do following :

1. In Eclipse, right click on your application class, and choose Run As –> Run Configurations

2. In Common tab, Encoding group, click on the “Other” and select the UTF-8.

3. Done, Eclipse is able to display the Chinese character now.

eclipse in utf-8 output
Note
The main idea is to change the output decoding to UTF-8.

11 comments on “How to display chinese character in Eclipse console

  1. Request you to let us know how to set the encoding during the runtime on J2EE servers ?
    We have tried to set the System.setProperty(“file.encoding”, ENCODING_ISO88591)
    but it does not work. How ever if we run the program with the above setting in debug configuration by selecting the custom encoding than it works.

    Request you to advice. Appreciated your help.

Leave a Comment

Your email address will not be published. Required fields are marked *