native2ascii 是jdk自带的一个工具,只需我们配置好环境变量,就可以直接在windows的cmd.exe下进行操作。
执行将D:/test.properties转换成unicode码并输出到D:/testOut.properties
运行--cmd:
命令:native2ascii D:/test.properties D:/testOut.properties
test.properties文件中的内容:
不能为空
{0}必须大于{1}
命令执行后testOut.properties文件中的内容:
/u4e0d/u80fd/u4e3a/u7a7a
{0}/u5fc5/u987b/u5927/u4e8e{1}