Save could not be completed. Reason: some characters cannot be mapped using “ISO-8859-1“ character encoding.的解决方案分析
刚才在套用模板时 出现了以下的错误:
Save could not be completed. 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.好像是在添加中文后的保存时出现的这个错误!
以下是我个人的几个解决方案,可供大家参考:
1.eclipse --> window --> Preferences --> General --> Content Types --> Test --> 单击 Java Properties File,在底部出现 'Default edcodng:',改成utf-8或GBK,然后update. 虽然能保存。
这样默认打开的文件为Properties Editor,使用此编辑器再编辑一遍!然后使用文本编辑器查看就可以看到自动转化的native2ascii编码了!
2 应该使用eclipse的jinto插件编辑,会自动调用java的native2ascii把文件转码。 jinto插件下载:http://www.guh-software.de/jinto.html 附: Eclipse下安装Properties Editor 在eclipse下"帮助"---"软件更新"--"查找并安装"--"搜索要安装的新功能部件" ---"下一步"---"新建远程站点"---填写"名称":Properties Editor;
URL为:http://propedit.sourceforge.jp/eclipse/updates/ 点 完成, 让它自己下载插件.. 找到合适的Properties Editor安装,这一个插件是减少转化为utf-8格式,在struts自动转换的.
这样,eclipse插件就可以自己安装。