`
djz
  • 浏览: 16960 次
  • 性别: Icon_minigender_1
  • 来自: 广州
文章分类
社区版块
存档分类
最新评论

myeclipse 中的'ISO-8859-1'编码问题

阅读更多
问题描述:在eclipse下建了个struts项目,修改ApplicationResources.properties文件时,输入中文,就不能保存.提示信息如下 :
"Some characters cannot be mapped using 'ISO-8859-1' character encoding. Either changethe encoding or remove the characters which are not supported by the 'ISO-8859-1' character encoding."
解决方案:1增加%@page pageEncoding="GBK"%或者是%@page pageEncoding="UTF-8"%解决方案:2应该使用eclipse的jinto插件编辑,会自动调用java的native2ascii把文件转码。jinto插件下载:http://www.guh-software.de/jinto.html  解决方案:3eclipse --> window --> Preferences --> General --> Content Types
--> Test -->
单击 Java Properties File,在底部出现 'Default edcodng:',改成GBK,或是UTF-8;然后update.
虽然能保存,但还必须利用 native2ascii 来转换一下,不然输出还是乱码.
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics