native2ascii是JDK自带的一个工具,用它可以解决properties文件的乱码问题。
命令如下:native2ascii -encoding GBK Inventory.properties Inventory1.properties
转换之后properties文件打开可以看到如下代码:
result.equal = /u606d/u559c/u4f60/uff0c/u7b54/u5bf9/u4e86/uff01
result.small = /u592a/u5c0f/u4e86/uff0c/u91cd/u65b0/u731c/u5427/uff01
result.big = /u592a/u5927/u4e86/uff0c/u91cd/u65b0/u731c/u5427/uff01