呉云峰の部屋

IntoTheWind,intoTheRain
posts - 3, comments - 0, trackbacks - 0, articles - 5

struts2 国际化 乱码

Posted on 2009-08-31 17:24 ゴ ウンホウ 阅读(274) 评论(0)  编辑  收藏

开发工具:MyEclipse 6.01,所有的文件编码都设置为utf-8。所有过程正常开发结束后。将messagesource.propertis本地化:
native2ascii messagesource.propertis messagesource_zh_CN.propertis
运行,发现页面上从资源文件中读取的内容仍然为乱码。

解决方法:本地化时指定编码方式即可,如下:
native2ascii -encoding UTF-8 messagesource.propertis messagesource_zh_CN.propertis

资料来源:学网(www.xue5.com),原文地址:http://www.xue5.com/itedu/200707/133887.html


只有注册用户登录后才能发表评论。


网站导航: