Note: The display of all the Chinese encoding is mainly GBK and UTF-8,UTF-8 is the international standard of Chinese encoding , recommended use.
I. Setting the encoding of the workspace
The encoding of the editor affects the display of characters in all items, which can be said to be the most widely used setting, and each item is affected by this setting. Click the window in the menu bar--option (Preferences).
- Click General--working space (wordspace), then select the encoding format you want to set in the text file encoding format on the right, and the default format for the system is GBK. END
Two. Set the encoding for the project
- If the other items do not have garbled problem, but the individual items appear garbled, then we do not need to set the work space coding, only need to modify the code of the project.
- When the item is selected, right-click and click Properties in the Pop-up menu.
- In the pop-up Properties window, select Resources (Resource)--click Select Other, then select the encoding format you want. END
Three. Set the encoding for individual files
- Only individual files garbled, then set the encoding format of individual files can solve the problem. Select the file that has garbled characters, and then right-click.
- In the pop-up menu, select Properties.
- Select the resource in the pop-up Properties window and click Other to set the encoding for individual files.
Solve the problem of Eclipse Chinese garbled