Native2ascii.exe character transcoding and anti-transcoding, ascii Transcoding
I recently developed OAF for secondary development. When reading code written by others, I found that there are always such statements: "\ u65e0 \ u6548 \ u7684GP \ u9879 \ u76ee \ u7f16 \ u53f7133, Which is transcoded using native2ascii.exe, a tool in java_home. When message notifications are displayed, oracle does not recommend this. messages are usually configured under the role of "application developers. Next I will introduce how to use the native2ascii.exe tool for transcoding and anti-transcoding.
1. java character Transcoding
Open the dos window, Enter cmd, and enter cd C: \ Program Files \ Java \ jdk1.7.0 \ bin to enter the JAVA_HOME directory of Java:
Create two files in JAVA_HOME: 1. properties and 2. properties.
Open 2. properties in notepad, enter the text to be encoded, and save,
Enter native2ascii-encoding gb2312 2. properties 1. properties in the command line, and press Enter.
Open the 1. properties file in notepad and find that the file contains the following transcoding content:
\ U535a \ u5ba2 \ u56ed \ uff0c \ u7a0b \ u5e8f \ u5458 \ u7684 \ u4e0a \ u7f51 \ u5bb6 \ u56ed \ uff01
2. Java character anti-Transcoding
Similarly, in 1. properties, enter the content to be transcoded and save it, for example:
\ U672a \ u8f93 \ u5165 \ u5408 \ u540c \ u6027 \ u8d28
Enter native2ascii-reverse 1. properties 2. properties in the command line, and press Enter.
2. The content in properties is changed to: "contract nature not entered ",