You can follow below steps to set the default file encoding in Eclipse:
- Window > Preferences > General > Content Types, set UTF-8 as the
default encoding for all content types.
- Window > Preferences > General > Workspace, set "Text file encoding"
to "Other : UTF-8".
- You can also set the default encoding in
eclipse.ini
: Open
eclipse.ini in your eclipse home directory --> put the line
-Dfile.encoding=UTF-8
at the end of the file --> Save
Then import the project again.
For the projects which already imported, you can right click the Project --> Properties and select Resource on the left side menu. You can now change the Text-file encoding to whatever you wish.
This article for your reference : Unicode/UTF-8 in your Eclipse Java projects
