Main Tutorials

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.

About Author

author image
Founder of Mkyong.com, love Java and open source stuff. Follow him on Twitter. If you like my tutorials, consider make a donation to these charities.

Comments

Subscribe
Notify of
11 Comments
Most Voted
Newest Oldest
Inline Feedbacks
View all comments
Diksha
1 year ago

I have done the same thing but it is not working

lyna
1 year ago
Reply to  Diksha

same here, did you find the solution ?

Roni
3 years ago

Good information.

Jaywant Dharwadkar
8 years ago

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.

Andreea
9 years ago

Thank you!

Nate
10 years ago

great! that helped a lot 🙂 🙂
Thank U !!

whspecial
11 years ago

great!

Ashley
11 years ago

The information is very helpful, thanks:-)

Caprice Lewczyk
11 years ago

Great information 🙂

GOWRI SANKAR
9 years ago

thanks, mkyong! such a great treasure of information.

Jeca
9 years ago

Thank you so much! 🙂 This was giving me a major headache!