Eclipse 中 字符无效 和 The byte order mark (BOM) is UTF-8解决方法

来源:互联网 发布:捡尸神器淘宝叫什么 编辑:程序博客网 时间:2024/06/15 20:50

经常性的在eclipse中使用编码的时候,会遇到这种情况。

can not resolved as a type

或者是  系统找不到符号等等。

 

这时候使用eclipse在文档上点击“右键”,选择properties,会看到在UTF-8下面还有 一句这样的话The byte order mark (BOM) is UTF-8

解决方法:

将文档使用GBK编码,这时候会有多于的符号出现,删除他们,然后再改为UTF-8的形式。


0 0
原创粉丝点击