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 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 File--Properties, change the 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 to transcode with EditPlus, if there is no garbled in the EditPlus, can directly copy the contents of the file to eclipse, if EditPlus also garbled, you can first in EditPlus transcoding,editplus-> documents File encoding method, change the file encoding mode->GBK, and then use Eclipse to open it.
5,
Opening eclipse, sometimes the Chinese comment garbled, this is because the default encoding of the 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!
Eclipse Chinese Comment garbled solution