native2ascii 工具可以将带有本机编码字符(非拉丁 1 和非单一码字符)的文件转换成带有unicode编码字符的文件。
1.找到native2ascii工具
开始-搜索程序和文件-windows powershell
2.使用native2ascil命令,举例说明:
假设需要转化的属性文件为:d:\src\resources.properties(含有中文字符) ,转化后的属性文件为:d:\classes\resources.properties(中文字符统一转化为unicode)
那么使用如下命令 java_home\bin\native2ascii -encoding gbk d:\src\resources.properties d:\classes\resources.properties
1.找到native2ascii工具
开始-搜索程序和文件-windows powershell
2.使用native2ascil命令,举例说明:
假设需要转化的属性文件为:d:\src\resources.properties(含有中文字符) ,转化后的属性文件为:d:\classes\resources.properties(中文字符统一转化为unicode)
那么使用如下命令 java_home\bin\native2ascii -encoding gbk d:\src\resources.properties d:\classes\resources.properties