Eclipse修改编码格式(修改字符集)

默认情况下 Eclipse 字符集为 GBK,但现在项目一般 使用UTF-8,防止项目移植开发出现乱码,设置 Eclipse 开发环境的项目字符集为 UTF-8, 步骤如下:

1、项目设置

在菜单栏选择 Window -> Preferences -> General -> Workspace -> Text file encoding,在 Text file encoding 中点击 Other,选择 UTF-8,如图所示:


2、单个文件设置


猜你喜欢

转载自blog.csdn.net/u010217055/article/details/79647750