♣ Modifying workspace default encoding
♣ Encoding of modified files
♣ Modifying the encoding of a file type
1. Modify Workspace default encoding
Workspace, Preferences, window, Windows
2. Modify the encoding of the file:
Right-click on the Eclipse project file, select Properties, resource select Modify encoding format
3. Modify the encoding of a file type
Content Types, Preferences, window, Windows
On the right, find the type of file you want to modify, and I'll take *.java for example.
In the default encoding below, enter Utf-8->update->ok in the input box
4. Modify the encoding of individual files:
On a file in Package Explorer, right-click Properties--Resource Choose Modify encoding format, change text file encoding format to UTF-8
After the above steps, the new Java file is UTF-8 encoded, the new project is also UTF-8 encoded,
Eclipse compiles, runs, and debugs all without problems.
right|alston& thinking focus, original difficult, please respect the original.
Eclipse modifies the encoding format