Native2ascii.exe character transcoding and anti-transcoding, ascii Transcoding

Source: Internet
Author: User

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 ",

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.