QR code encoding principle 3 (Japanese Chinese characters and Chinese characters)

Source: Internet
Author: User

1. Japanese kanji is a two-byte postal code, which is encoded in a 13-byte binary code.

The conversion steps are as follows:

1. For characters with JIS values between 8140 (HEX) and 9ffc (HEX:

A) subtract 8140 (HEX) from the JIS value to be converted );

B) Multiply the high byte by C0 (HEX );

C) add the data generated by step B to the low byte;

D) convert the result to a 13-bit binary string.

2. For characters whose JIS value is e040 (HEX) to ebbf (HEX:

A) subtract the JIS value to be converted from c140 (HEX );

B) Multiply the high byte by C0 (HEX );

C) add the data generated by step B to the low byte;

D) convert the result to a 13-bit binary string.

 

2. The conversion steps for Chinese and Japanese Chinese characters are similar:

1. The first byte is 0xa1 ~ Between 0xaa, the second byte is 0xa1 ~ Characters Between 0xfe:

A) first byte minus 0xa1;

B) Multiply the previous result by 0x60;

C) The second byte minus 0xa1;

D) add the result of step B to the result of Step C;

E) convert the result to a 13-bit binary string.

1. The first byte is 0xb0 ~ Between 0xfa and the second byte is 0xa1 ~ Characters Between 0xfe:

A) the first byte minus 0xa6;

B) Multiply the previous result by 0x60;

C) The second byte minus 0xa1;

D) add the result of step B to the result of Step C;

E) convert the result to a 13-bit binary string.

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.