访问资源文件 乱码的解决

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 就看到效果了

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值