1. 修改 workspace text file encoding
Window->Preferences->General->Workspace 面板Text file encoding 选择UTF-8

2. 修改资源文件编码
Window->Preferences->General ->Content Type->Text ,选择Java Source File、XML、Java Properties File等,在下面的Default encoding输入框中输入UTF-8,并点Update生效

Window->Preferences->Web,以下的每个面板选择 ISO 10646/Unicode(UTF-8)

3.修改工程的编码
右击工程 -> Properties -> Resource -> Text file encoding,修改即可

网友评论