1、新建工程对应的Text file encoding 为UTF-8
windows --> Preferences --> General (在左侧)--> Workspace(在左侧) -->Text file encoding(在右侧) 点击other 改为UTF-8即可。
2、设置java文件的编码为UTF-8(包括properties、 XML等)
windows --> Preferences --> General (在左侧)--> Content Types 下的 Text(在右侧)-->Text -->Java Source File 然后再Default encoding 中输入UTF-8 点击update即可。(参照 2 可以设置HTML、JSP、JS等编码方式为UTF-8)
3、设置jsp默认编码为UTF-8
windows --> Preference --> Myeclipse(在左侧) --> Files and editors(在左侧) --> jsp (在左侧)--> 选择 IOS 10646/unicode UTF-8然后apply即可。(同理,可是只HTML、JavaScript等的默认编码)