6.8. GB 2312 Mapping

GB 2312 is the multibyte encoding standardised by the Peoples Repulic of China, called Chinese (simplified) by Microsoft. It is a DBCS encoding, with lead bytes of byte pairs in range 0xA1-0xFE followed by trail bytes in the range 0xA1-0xFE.

In GB 2312-80, 0x80 is subtracted from each byte, so the range for each byte is 0x21-0x7E, that is, the characters with codes in the printable range of ASCII. Thus, GB2312-80 files can be edited with any ASCII text editor.

Our data comes from Unicode Inc, which presents the GB2312-80 formulation, so we adjust it to GB2312.
6.8.1. Conversion functions
6.8.2. Tables