Location Code, Country Code, internal code

Source: Internet
Author: User

In 1980, in order to make each Chinese character have a unified national code, China issued a Chinese character encoding National Standard: GB2312-80 "information exchange with Chinese character encoding Character Set-basic set", this character set is the unified standard for all Chinese character systems in China. It specifies that two bytes are used to represent a Chinese character. Each byte can only use a minimum of seven characters, with a total of 128*128 States. Because the control code in ASCII is also used in the Chinese character system, therefore, only 94*94 = 8836 Chinese characters and 6763 full-angle characters are left in the 682x94 = states. Each character corresponds to a unique location code, country code, and internal code.

Location Code

A location code is a four-digit decimal number. The first two digits are called the location code, and the last two digits are called the location code. There are 94 partition codes (rows), and each partition has 94 locations (columns ).

1 ~ Zone 9 Special Character Area
10 ~ Zone 15 User-defined area
16 ~ Zone 55 Level 1 Chinese Character
56 ~ Area 87 Second-level Chinese Characters

Level 1 Chinese characters: 3755 commonly used Chinese characters, sorted by pinyin; Level 2 Chinese characters: 3008 Chinese characters, sorted by radicals. For processing and storage convenience, the area and bit numbers of each Chinese character are represented in one byte in the computer. For example, the area code of the Chinese character "" is 49, the location code is 07, and the location code is 4907d. The corresponding binary representation is 00110001 00000111 The Location Code cannot be used for communication because it may be used with the control code (00h ~ 1fh) conflict.

Country Code In order to conduct Chinese Character communication, add the location code and location code for 20 h to avoid the control code and obtain the country code. The Country Code is expressed in hexadecimal notation. For example, the Chinese character "Learning" is 5127 H. Internal code Because Chinese characters and English characters are usually mixed, Chinese characters may be confused with ASCII codes without special identifiers, for example, the Chinese character "Learning" country code is 51 27 h, in ASCII, "Q" and "'" are represented. One of the solutions to this problem is to encode the Chinese character at the highest position of 1 byte, that is, the country code plus 80 h, respectively, then the internal code of the Chinese character "Learning" is d1a7h. The internal code is expressed in hexadecimal notation. Gb2312 Simplified Chinese encoding table is Internal code table.

Location Code, Country Code, internal code

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.