JDK自带命令native2ascii的用法

1、只转换特定字符

native2ascii
在控制台中可以输入汉字回车后,就可以看到转移后的字符了。
 Ctrl+C退出。
2、转换properties文件

native2ascii allMessages_zh_CN.input.properties allMessages_zh_CN.properties
将文件allMessages_zh_CN.input.properties编码后输出为allMessages_zh_CN.properties。
为了方便properties文件的管理,建议纯中文的配置文件用input命名。
3、反向单一properties文件

native2ascii -reverse allMessages_zh_CN.properties allMessages_zh_CN.txt
注意-reverse参数

4、批量反向所有的properties文件
使用工具UncodeReverse.exe
详见:批量转换Uncode编码的文件,地址 http://blog.csdn.net/z3h/archive/2008/01/25/2065912.aspx

native2ascii相关链接:

 http://hi.baidu.com/suofang/blog/item/b38bb5019b6b0e03728da562.html

http://www.chinaitpower.com/A200507/2005-07-24/165716.html

原文地址:https://www.cnblogs.com/liaomin416100569/p/9331781.html