Solution and description:
1.When writing international files or resource files, you can use Chinese.EclipseThere is no problem with writing Chinese during the first editing, but when you save it and open it here, the Chinese will not be displayed, all of which are question marks or garbled characters.
This is because in a Chinese operating system,EclipsePairJavaThe default file encoding isGBK,PropertiesThe default character encoding of a file isISO-8859-1So we need to changeEclipsePairPropertiesThe default encoding of the file.
OpenWindow-> perferences->General-> Context types:SelectText --> JAVA properties FileInFile AssociationSelected in the window*. Properties (locked)In the followingDefault encodingFrom the defaultISO-8859-1ChangeGBK,Click againUpdateSave it.
2.InstallProperties Editor.Properties EditorYou can edit it directly.PropertiesFile, which can be saved directly without conversion.
How to installProperties Editor?
InEclipseOfHelpIn the menu, selectSoftware Updates-> Find and install ....Open the plug-in Installation Wizard.
1)SelectSearch for new features to install
2)If this is the first installationProperties editor,ClickNew remote site...InNew Update siteIn the input dialog box,NameYou can enter a name.
NameInput:Properties Editor
URLInput:Http://propedit.sourceforge.jp/eclipse/updates/
After confirmation, a plug-in website is added. you can install the plug-in following the prompts step by step, and then restart the agent.EclipseAnd restart the instance.