How to support UTF-8 encoding in Eclipse
How can I add UTF-8 support in eclipse? I want to add for example Russian language but eclipse won't support it. What should I do? Please guide me.
Solution 1:
Try this
1)
Window > Preferences > General > Content Types
, set UTF-8 as the default encoding for all content types.2)
Window > Preferences > General > Workspace
, setText file encoding
toOther : UTF-8
Solution 2:
Open Eclipse and do the following steps:
- Window -> Preferences -> Expand General and click Workspace, text file encoding (near bottom) has an encoding chooser.
- Select "Other" radio button -> Select UTF-8 from the drop down
- Click Apply and OK button OR click simply OK button
Solution 3:
You can set a default encoding-set whenever you run eclipse.exe.
- Open eclipse.ini in your eclipse home directory Or STS.ini in case of STS(Spring Tool Suite)
- put the line below at the end of the file
-Dfile.encoding=UTF-8