How to display non-english unicode (e.g. Chinese) characters in eclipse

If you are non-English speaking country native, and you are testing your application for your locale then you may face difficulty in testing your application through eclipse console. By default, Eclipse converts non-English characters as question marks (?) or some weird characters because by default eclipse’s console encoding is Cp1252 or ASCII, which is unable to display other non-English words.

You can easily change the default encoding to UTF-8 i.e. Unicode by setting below option.

Eclipse change default encoding to unicode
Eclipse change default encoding to unicode

Now when you use any non-English character in IDE and even print in console, it works perfect.

Successful Eclipse Unicode Translation
Successful Eclipse Unicode Translation

Here If you do not add Unicode support then above program will look like this.

Incorrect Eclipse Unicode Translation
Incorrect Eclipse Unicode Translation
If you want to apply Unicode UTF-8 for all projects all the time, then you should set it in eclipse.ini file.

-Dfile.encoding=UTF-8

Drop me comments if something is not clear.

Happy Learning !!

Was this post helpful?

Join 7000+ Awesome Developers

Get the latest updates from industry, awesome resources, blog updates and much more.

* We do not spam !!

3 thoughts on “How to display non-english unicode (e.g. Chinese) characters in eclipse”

  1. i want to run the same in console, so how can i do that ? I want to see the unicode characters in command prompt console.Please suggest me .

    Reply
    • There will be a lot of pain(at least it was so for me) to make this possible, it’s much easier to install some not-default bash

      Reply

Leave a Comment

HowToDoInJava

A blog about Java and related technologies, the best practices, algorithms, and interview questions.