native2ascii 在JDK/BIN 目录下
native2ascii [-reverse] [-encoding encoding] [inputfile [outputfile]]
正转:To:Unicode
native2ascii -encoding gb2312 source.properties target.properties
反转:Reverse Unicode To 指定码
native2ascii -reverse -encoding Big5 source22.properties target2.properties
当然了可以写成 BAT自动转化
1 先写 系统变量 path--- jdk/bin
2 建一个BAT文件
del ApplicationResources.properties
native2ascii -encoding gb2312 beyond.properties ApplicationResources.properties
保存 要转换那个资源文件 就把这个BAT 拷过去 执行一下 就OK
例子:C:/Tomcat 5.0/webapps/strutsjb9/WEB-INF/classes/beyond.properties
error.login.username=<li>不存在该用户名
error.login.nullusername=<li>用户名不能为空
error.login.password=<li>密码错误
errors.footer=</font></ul>
errors.header=<ul><font color="red">
然后你在打开ApplicationResources.properties 就看到效果了
博客介绍了native2ascii工具,它位于JDK/BIN目录,可进行正反转编码转换,如正转将指定编码转为Unicode,反转则相反。还说明了可通过设置系统变量和创建BAT文件实现自动转化,最后给出了资源文件转换的示例。

1097

被折叠的 条评论
为什么被折叠?



