Eclipse字符集设置方式

默认的字符集是GBK

 

1、windows->Preferences...打开"首选项"对话框,左侧导航树,导航到general->Workspace,右侧Text file encoding,选择Other,改变为 utf-8(必须小写),以后新建立工程其属性对话框中的Text file encoding即为UTF-8。

 

2、windows->Preferences...打开"首选项"对话框,左侧导航树,导航到general->Content Types,右侧Content Types树,点开Text,选择 Java Source File,在下面的Default encoding输入框中输入UTF-8,点Update,则设置Java文件编码为UTF-8。然后设置jsp、js、css等类型的Default encoding,设置方式同Java Source File。

 

3.windows->Preferences...打开"首选项"对话框,左侧导航树,导航到MyEclipse->Files and Editors->JSP,把Encoding改为UTF-8

原文地址:https://www.cnblogs.com/Theladyflower/p/3216769.html