怎么将相似\u6570\u636e\u5e93的东西转化为汉字

命令..\jdk1.8_64\bin\native2ascii.exe是JDK自带的转码工具工具

将中文转码为UTF8(\u6570\u636e\u5e93)命令格式:  utf-8

native2ascii -encoding gb2312 before.properties after.propertiesci

 

将转码后的字符转换回中文命令格式:jdk

native2ascii -reverse  after.properties before.properties  coding

 

before.properties文件中是转码前的中文, after.properties就是转码后的utf-8格式。di

实例:文件

before.properties的内容:encoding

         你好世界co

after.properties的内容:字符

         \ufffd\ufffd\u077f\ufffd

相关文章
相关标签/搜索