java中使用JDK的native2ascii进行字符转换 国际化中的汉字转换
1. 首先,创建一个properties文件,如temp.properties
typeID=类别编码
typeName=类别名
typeFlags=标识
2. 打开dos命令,转到temp.properties的根目录
3. 输入: D:\>native2ascii -encoding gb2312 temp.properties temp_zh.properties4. 在c盘下就会生成 temp_zh.properties ,内容如下:
typeID=\u7c7b\u522b\u7f16\u7801typeName=\u7c7b\u522b\u540d
typeFlags=\u6807\u8bc6
---------完---------------