Step 1. In the eclipse menu bar, Window–>Preferences–>General–>Content types
Set the default encoding of JAR Content and Java Class File to the encoding you want.
Step 2. Just setting the above is not enough, you also need to set the Workspace code. Window–>Preferences–>General–>Workspace, set the default encoding of Text file encoding to the same encoding as above.
Step 3. Save and restart Eclipse to find that the garbled problem is solved.