Eclipse 编码设置


实际开发中经常需要设置项目以及文件的编码为UTF-8,设置步骤如下:


1、workspace 工作空间编码设置

     菜单栏 Window -> preferences -> Workspace -> Text file encoding


Eclipse 编码设置



2、项目编码设置

选中被设置项目,右键 -> properties -> Resource -> Text file encoding


Eclipse 编码设置


3、jsp 文件编码设置(一) 菜单栏 Window -> preferences -> Web -> JSP Files  -> 右侧面板 Encoding


Eclipse 编码设置



4、jsp 文件编码设置(二) 菜单栏 Window -> preferences -> General -> Content Types  -> 在右侧列表框找到并选中JSP  ,在 Default Encoding 框内 输入 UTF-8   ,点击 “Update”



Eclipse 编码设置