When importing someone else's project or Java file into your eclipse, it is often the case that the Chinese comment of the Java file becomes garbled, mainly because someone else's IDE encoding format differs from your own Eclipse encoding format.
Summarize the online suggestions and their own experience, you can refer to the following several solutions:
1 changing the encoding format of the entire file type
1) eclipse->window->preferences->general->content Types
2) Find the type of file to be modified (java,jsp, etc.), there is a default encoding below, enter GBK or UTF-8 in the input box
3) Click Update
4) Click OK
5) Restart Eclipse
2 changing the encoding format for the entire Eclipse workspace
1) eclipse->window->preferences->general->workspacetypes
2) Change the text file encoding format to GBK
3 changing the encoding format of individual files in Package Explorer right-click on file--Properties, change text file encoding format to GBK
4 If the above methods still can not be resolved, the following is the last resort:
Open the file you want to transcode with EditPlus, if it is not garbled in EditPlus, you can copy the contents of the file directly into eclipse.
If EditPlus also have garbled, can first in EditPlus transcoding,editplus-> Document---File encoding method, change file encoding method->GBK,
And then use Eclipse to open it.
5 open Eclipse, sometimes the Chinese comment garbled, this is because the default encoding of Text file encoding in Eclipse is GBK, so right click on your "project", the "Text file encoding" in info In the other changes to UTF-8, you can!
Myeclipse10 Chinese Comment garbled problem