1 Entering Window->preferences
- General->content types, you can set the text corresponding to the default encoding value of UTF-8 or empty, and then click Update. You may also click Text to enter the Java source file property, set the default encoding value to UTF-8 or empty, and click Update.
- General->editors->text editors->spelling. Set the Encoding property to UTfF-8.
- General->workspace. Set the text file encoding to UTF-8.
- MyEclipse->files and editors. There is usually no need to modify this, so leave the default. The default ASP and PHP and JSP encoding are ISO Latin-1, and the encoding value of the other properties is ISO 10646/unicod (UTF-8)
2 Right-click the Properties property of the project, select Resource, set the text file encoding value to UTF-8.
The above methods can basically solve all the garbled problem, if not, you can select a Java file, right-click the Properties property, enter resource Select text file Encoding is encoded in UTF-8. Or put a single file in txt text, make sure it's not garbled and then copied in. These two methods are only suitable for a small number of files garbled, not suitable for the entire project garbled.
Finally, restart the program.
MyEclipse garbled problem