---
title: "myeclipse 中的'ISO-8859-1'编码问题"
author: "djz"
date: "2007-05-15T08:43:34Z"
tags: []
slug: "myeclipse-iso-8859-1"
draft: false
lastmod: "2007-05-15T08:43:34Z"
id: 79980
url: "https://djz.iteye.com/blog/79980"
---

问题描述：在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 --&gt; window --&gt; Preferences --&gt; General --&gt; Content Types  
\--&gt; Test --&gt;  
单击 Java Properties File,在底部出现 'Default edcodng:',改成GBK,或是UTF-8；然后update.  
虽然能保存,但还必须利用 native2ascii 来转换一下,不然输出还是乱码.