myeclipse 中的'ISO-8859-1'编码问题: 在eclipse中创建tomcat project工程后,在创建的jsp文件中若包含中文,当保存文件时,会弹出提示框,并使保存失败。提示框的内容为:''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." ,
在网上查了一下解决办法,找到3条:
1:在文件开头增加< pageEncoding="GBK"%>
2:应该使用eclipse的jinto插件编辑,会自动调用java的native2ascii把文件转码。jinto插件下载:
3:在eclipse --> window --> Preferences --> General --> Content Types --> Test -->
单击 Java Properties File,在底部出现 'Default edcodng:',改成GBK,然后update. 虽然能保存,但还必须利用 native2ascii 来转换一下,不然输出还是乱码。
第一条我试过,问题解决;后两条未试验,^-^.
阅读(278) | 评论(0) | 转发(0) |