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

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

can not resolved as a type

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

 

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

解决方法:

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

posted @ 2012-11-05 17:16  lxzh504  阅读(3266)  评论(0编辑  收藏  举报