I recently in doing oaf two times development, in looking at other people write code, found that there are always similar statements: "\U65E0\U6548\U7684GP\U9879\U76EE\U7F16\U53F7", these statements are actually used Java_ The tools in Home are Native2ascii.exe transcoded. Oracle does not recommend this when displaying a message notification, and is usually a message that is assigned under the responsibility of the app developer. Let me show you how to use the Native2ascii.exe tool to transcode and reverse code.
1.java character transcoding
Open the dos window, enter cmd, and enter:cd C:\Program files\java\jdk1.7.0\bin into java_home directory for Java :
Create a new two files in Java_home:1.properties and 2.properties
Open 2.propertieswith Notepad, enter the text you want to encode, save it,
On the command line input:native2ascii-encoding gb2312 2.properties 1.properties, enter
Open the 1.properties file with Notepad and find the following transcoding content in the file:
\u535a\u5ba2\u56ed\uff0c\u7a0b\u5e8f\u5458\u7684\u4e0a\u7f51\u5bb6\u56ed\uff01
2.Java character Reversal code
Similarly, enter the contents of the code to be reversed in 1.properties, and save as:
\u672a\u8f93\u5165\u5408\u540c\u6027\u8d28
On the command line input:native2ascii-reverse 1.properties 2.properties, enter
The contents of the 2.properties were found to be: "not entered into a contractual nature",
Java character transcoding and reversal codes