eclipse 设置编码为UTF-8
关键字: eclipse
eclipse第一次使用的时候,默认系统的编码一般是GBK,项目一般都是UTF-8编码,导致打开后出现乱码。
1.Windows–>Preferences–>General–>Workspace–>Text file encoding 选择为UTF-8
2.Windows–>Preferences–>General–>Content Types–>Java Properties File ,在Default encoding 输入UTF-8.
这样打开properties文件就是UTF-8编码了。
3.Windows–>Preferences–>General–>Content Types–>JavaScript Source File ,在Default encoding 输入UTF-8.
4.Windows–>Preferences–>General–>Content Types–>Jsp ,在Default encoding 输入UTF-8.
5.Windows–>Preferences–>Web–>CSS Files ,在Encoding 选择”ISO 10646/Unicode(UTF-8)”.
6.Windows–>Preferences–>Web–>HTML Files ,在Encoding 选择”ISO 10646/Unicode(UTF-8)”.
7.Windows–>Preferences–>Web–>JSP Files ,在Encoding 选择”ISO 10646/Unicode(UTF-8)”.
本文固定链接: http://www.chepoo.com/eclipse-code-for-utf-8.html | IT技术精华网