A use of native2ascii command!
Describe this command in the JDK file:
Native2ASCII Convert Text To Unicode Latin-1.
The syntax is as follows:
Native2ASCII [Options] [InputFile "]]
The specific options are:
-reverse Perform The Reverse Operation: Convert A File with Latin-1 and / OR
Unicode Encode Characters to One with native-encoded character.
-ENCODING Encoding_name
Specify The Encoding Name Which is buy by the conversion procedure.
The Default Encoding Is Taken from System Property File.Encoding. The
ENCODING_NAME STRING MUST Column of The Table of Take
SUPPORTED Encodings in the support of encodings document.
-JOPTION Pass option to the Java Virtual Machine, WHERE OPTION IS One of the
Options described on the reference page for the Java Application Launcher.
For example, -j-xms48m sets the startup memory to 48 megabytes
Sometimes we will see such a code sentence when we refine the code of others.
System.out.Println ("ConnectionPool - / U521D / U59CB / U5316 / U6570 / U636E / U5E93 / U5
F02 / u5e38 == >> " exception.toString ());
Of course, this is just a simple print error message, we can use the native2ascii command to convert it into original Chinese.
The practice is as follows: If there is a file name: Test.class. First use the anti-compilation tool to compile it, I use DJ
Java Jecompiler, the anti-compiled file extension is: ". Jad"
Import Java.io.printStream;
Public class test {
Public static void main (string args []) {string s =
"/ U770B / U770B / U6211 / U6D4B / U8BD5 / U7684 / U6548 / U679C / UFF01"; System.out.Println ((NEW
Stringbuilder ()). Append ("/ u5475 / u5475 / uff1a"). Append (s) .tostring ());}}
This is an anti-compiled file.
There will be a corresponding file generation after the refinement. It may not be directly ".java", no relationship, directly
The anti-compiled document extension is changed to .java, such as me, change to Test.java. Then open DOS, then enter
To the corresponding directory: as follows:
J: /> J: /> DIR 2004-11-11 10:10 588 Test.jadj: /> Remove Test.jad to Test.java, then use the following command: j: /> native2ascii -reverse -encoding GB2312 Test .java Test_gb2312.java In conjunction with several options of this command, two options are used: -Reverse and -Encoding, and later is the encoding to be converted to. I want to display it as
Chinese, so I chose GB2312, Test.java is a file that has just been renamed after completion.
Test_gb2312.java is the code after the transcodation, opens the test_gb2312.java file with editplus
I will find that Chinese is displayed, this is successful, this command you used?
Oh, you can transfer in real time in the command line, open DOS Enter the native2ascii command, enter, and then there will be light
The label is flashing, don't think that the program is not executed, the cursor flashes to wait for you to enter characters, switch to Chinese input
Status, input, "java, I love you", I will see this display: "Java / U6211 / U7231 / U4F60"
Oh, it is not very interesting. ^ _ ^ ~ _ ~ .... . . . . . . . . How much have you got today?
, Knowledge is accumulated, friends, come on, one day, our knowledge will be like a pyramid.