码迷,mamicode.com
首页 > 移动开发 > 详细

some characters cannot be mapped using iso-8859-1 character encoding

时间:2015-03-07 18:45:06      阅读:132      评论:0      收藏:0      [点我收藏+]

标签:java   utf-8   character   

some characters cannot be mapped using iso-8859-1 character encoding

Eclipse中新建一个.properties文件,如果输入中文保存时就会提示错误

Reason:
some characters cannot be mapped using "ISO-8859-1" character encoding.
Either change the encoding or remove the characters which are not supported
by the "ISO-8859-1" character encoding.


解决办法:
方案一: 菜单->Window->Preferences->General->Content Types->Text->Java Properties File设置Default encoding,把ISO-8859-1改为UTF-8  然后update.
 如果是jsp文件或者其他文件不能保存,也可以使用相同的方法,在Text里选择相应类型的文件,将下面的Default encoding,从ISO-8859-1改为UTF-8即可。
方案二:如果是jsp不能保存,那么可以把pageEncoding设置为UTF-8就行了,比如:pageEncoding="UTF-8"   
或者Ctrl+F找找iso-8859-1,把所有的iso-8859-1替换为UTF-8也行。

some characters cannot be mapped using iso-8859-1 character encoding

标签:java   utf-8   character   

原文地址:http://blog.csdn.net/linwei_hello/article/details/44117905

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!