资源国际化

properties 文件里的资源必须经过编码,不能出现中问,日文等。且必须是ASCII 码。

jdk 中bin 文件夹下的native2ascii.exe 可以把资源转换为ascii 码。

在命令提示符中输入 

native2ascii [-encoding UTF-8] [sourcefile] [targetfile] 可以整个文件按utf-8编码转换为ascii 码

例一:native2ascii -encoding UTF-8 d:test.txt d:test_zh_CN.properties

输入native2ascii [sourcefile] [targetfile]可以按默认编码转为ascii 码

例二:native2ascii d:test.txt d:test2_zh_CN.properties

输入 native2ascii -reverse [sourcefile] [targetfile]  可以把ascii 转换为本地资源文件

例三:native2ascii -reverse d:test_zh_CN.properties d:text2.txt

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值