2012年4月9日 星期一

在Eclipse的properties檔註解使用中文

我從svn將整個專案load下來後發現我的properties註解部分有亂碼,
但svn上的原始檔案並不會,在直接更改亂碼部分為中文,更改完後要儲存時
發生Eclipse save problem,錯誤訊息為
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.


Please go to "Windows > Preferences > General > Content Types > Text > Java Properties Files or ...

> Default encoding > UTF-8 and click update button


之後就可以儲存成功了。

沒有留言:

張貼留言