GB 18030 is a Chinese government standard, described as Information Technology — Chinese coded character set and defines the required language and character support necessary for software in China. GB18030 is the registered Internet name for the official character set of the People's Republic of China (PRC) superseding GB2312. As a Unicode Transformation Format (i.e. an encoding of all Unicode code points), GB18030 supports both simplified and traditional Chinese characters. It is also compatible with legacy encodings including GB/T 2312, CP936, and GBK 1.0.
The Unicode Consortium has warned implementers that the latest version of this Chinese standard, GB 18030-2022, introduces what they describe as "disruptive changes" from the previous version GB 18030-2005 "involving 33 different characters and 55 code positions". GB 18030-2022 was enforced from 1 August 2023. It has been implemented in ICU 73.2; and in Java 21, and backported to older Java 8, 11, 17 (LTS releases) and 20.0.2.
In addition to the encoding method, this standard contains requirements about which additional scripts and languages should be represented, and to whom this standard is applicable. Alt URL This standard however does not define the official character forms for the Chinese characters; this is standardised in List of Commonly Used Standard Chinese Characters.
History
The GB18030 character set is formally called "Chinese National Standard GB 18030-2005: Information Technology—Chinese coded character set". GB abbreviates (), which means national standard in Chinese. The standard was published by the China Standard Press, Beijing, 8 November 2005. Only a portion of the standard is mandatory. Since 1 May 2006, support for the mandatory subset is officially required for all software products sold in the PRC. + Different Unicode mappings between GB 18030 versions GB bytesequence Unicode code point GB 18030-2000 GB 18030-2005 A8 BC (ḿ) 81 35 F4 37
An older version of the standard, known as "Chinese National Standard GB 18030-2000: Information Technology—Chinese ideograms coded character set for information interchange—Extension for the basic set", was published on March 17, 2000. The encoding scheme stays the same in the new version, and the only difference in GB-to-Unicode mapping is that GB 18030-2000 mapped the character (ḿ) to a private use code point U+E7C7, and character (without specifying any glyph) to U+1E3F (ḿ), whereas GB 18030-2005 swaps these two mapping assignments. More code points are now associated with characters due to update of Unicode, especially the appearance of CJK Unified Ideographs Extension B. Some characters used by ethnic minorities in China, such as Mongolian characters and Tibetan characters (GB 16959-1997 and GB/T 20542-2006), have been added as well, which accounts for the renaming of the standard.
Compared with its ancestors, GB 18030's mapping to Unicode has been modified for the 81 characters that were provisionally assigned a Unicode Private Use Area code point (U+E000–F8FF) in GBK 1.0 and that have later been encoded in Unicode. This is specified in Appendix E of GB 18030. There are 24 characters in GB 18030-2005 that are still mapped to Unicode PUA.
In the GB 18030-2022 update, the requirements for characters to be mapped to PUA has been lifted completely and all characters should be mapped to their standard Unicode codepoints. Of these, 18 mappings were updated by position-swapping similar to what happened between GBK and GB 18030. The remaining six kept the two-byte PUA mappings, so that a change to the 4-byte sequence is needed to follow the non-PUA preference.
+ Private use characters in GB-to-Unicode mappings GB bytesequence Unicode code point GBK 1.0 GB 18030-2005 Unicode 4.1 GB 18030-2022A6 D9U+E78DA6 DAU+E78EA6 DBU+E78FA6 DCU+E790A6 DDU+E791A6 DEU+E792A6 DFU+E793A6 ECU+E794A6 EDU+E795A6 F3U+E796A8 BCU+E7C7A8 BFU+E7C8A9 89U+E7E7A9 8AU+E7E8A9 8BU+E7E9A9 8CU+E7EAA9 8DU+E7EBA9 8EU+E7ECA9 8FU+E7EDA9 90U+E7EEA9 91U+E7EFA9 92U+E7F0A9 93U+E7F1A9 94U+E7F2A9 95U+E7F3FE 50U+E815FE 51U+E816U+E816FE 52U+E817U+E817FE 53U+E818U+E818FE 54U+E819FE 55U+E81AFE 56U+E81BFE 57U+E81CFE 58U+E81DFE 59U+E81EFE 5AU+E81FFE 5BU+E820FE 5CU+E821FE 5DU+E822FE 5EU+E823FE 5FU+E824FE 60U+E825FE 61U+E826FE 62U+E827FE 63U+E828FE 64U+E829FE 65U+E82AFE 66U+E82BFE 67U+E82CFE 68U+E82DFE 69U+E82EFE 6AU+E82FFE 6BU+E830FE 6CU+E831U+E831FE 6DU+E832FE 6EU+E833FE 6FU+E834FE 70U+E835FE 71U+E836FE 72U+E837FE 73U+E838FE 74U+E839FE 75U+E83AFE 76U+E83BU+E83BFE 77U+E83CFE 78U+E83DFE 79U+E83EFE 7AU+E83FFE 7BU+E840FE 7CU+E841FE 7DU+E842FE 7EU+E843FE 80U+E844FE 81U+E845FE 82U+E846FE 83U+E847FE 84U+E848FE 85U+E849FE 86U+E84AFE 87U+E84BFE 88U+E84CFE 89U+E84DFE 8AU+E84EFE 8BU+E84FFE 8CU+E850FE 8DU+E851FE 8EU+E852FE 8FU+E853FE 90U+E854FE 91U+E855U+E855FE 92U+E856FE 93U+E857FE 94U+E858FE 95U+E859FE 96U+E85AFE 97U+E85BFE 98U+E85CFE 99U+E85DFE 9AU+E85EFE 9BU+E85FFE 9CU+E860FE 9DU+E861FE 9EU+E862FE 9FU+E863FE A0U+E864 Notes a.Blue indicates private use area b. mapped to 0x95329031 in GB 18030-2022 c. mapped to 0x95329033 in GB 18030-2022 d. mapped to 0x95329730 in GB 18030-2022 e. mapped to 0x9536B937 in GB 18030-2022 f. mapped to 0x9630BA35 in GB 18030-2022 g. mapped to 0x9635B630 in GB 18030-2022
As a national standard The first version of GB 18030, designated GB 18030-2000 Information Technology—Chinese coded character set for information interchange — Extension for the basic set, consists of 1-byte and 2-byte encodings, together with 4-byte encoding for CJK Unified Ideographs Extension A matching those in Unicode 3.0. The corresponding Unicode code points of this subset, including provisional private assignments, lie entirely in the BMP. These parts are fully mandatory in GB 18030-2000. Most major computer companies had already standardized on some version of Unicode as the primary format for use in their binary formats and OS calls. However, they mostly had only supported code points in the BMP originally defined in Unicode 1.0, which supported only 65,536 codepoints and was often encoded in 16 bits as UCS-2. This standard is basically an extension based on GBK with additional characters in CJK Unified Ideographs Extension A.
The second version designated GB 18030-2005 Information Technology—Chinese coded character set has the same mandatory subset as GB 18030-2000 of 1-, 2- and 4-byte encodings. This version also includes the full CJK Unified Ideographs Extension B in the 4-byte encoding section which is outside the BMP as a suggestion support requirement. However, as the inclusion of CJK Unified Ideographs Extension B in a 4-byte region is required to be maintained during information processing, software can no longer get away with treating characters as 16-bit fixed width entities (UCS-2). Therefore, they must either process the data as a variable-width format (as with UTF-8 or UTF-16), which is the most common choice, or move to a larger fixed-width format (i.e. UTF-32). Microsoft made the change from UCS-2 to UTF-16 with Windows 2000. This version matches with Unicode 3.1, and also provided support for Hangul (Korean), Mongolian (including Manchu, Clear script, Sibe hergen, Galik), Tai Nuea, Tibetan, Uyghur/Kazakh/Kyrgyz and Yi.
The third and latest version, GB 18030-2022 Information Technology—Chinese coded character set, mandates the suggestion support part of CJK Unified Ideographs Extension B in GB 18030-2005, along with updates up to Unicode 11.0 including Kangxi Radicals and CJK Unified Ideographs URO, Extension C, D, E and F. Additional languages are also recognized by GB 18030-2022 such as part of Arabic, Tai Le, New Tai Lue, Tai Tham, Lisu, and Miao. GB 18030-2022 also introduces three implementation levels, with the requirement of "all products using this standard should implements Implementation Level 1" that includes 66 new BMP characters in the 4-byte encoding region that were added between Unicode 3.1 and Unicode 11.0. Implementation Level 2 requires the support of List of Commonly Used Standard Chinese Characters, and Implementation Level 3 requires all other specified regions in the standard.
From late 2022 to 2023, drafts of a further amendment are to be made to GB 18030-2022 available for public consultation. The current draft updates up to Unicode 15.1 on Ideographic Description Characters, CJK Unified Ideographs URO, Extension A, B, C, G, H and I. Originally, in late 2022, it would have placed 897 new sinographic characters in Plane 10 (hexadecimal: 0A), a yet-untitled astral Unicode plane, for citizen real-name certification in China, but eventually the repertoire (reduced to 622 characters after expert review) was fast-tracked into Unicode 15.1 in September 2023, as the CJK Unified Ideographs Extension I block. Following this, the amendment draft was modified to use the Extension I code points.
Mapping GB 18030 defines a one (ASCII), two (extended GBK), or four-byte (UTF) encoding. The two-byte codes are defined in a lookup table, while the four-byte codes are defined sequentially (hence algorithmically) to fill otherwise unencoded parts in UCS. GB 18030 inherits the bad aspects of GBK, most notably needing special code to safely find ASCII characters in a GB18030 sequence.
+ GB 18030 encodingAuthoritative mapping table between GB18030-2000 and Unicode. ICU International Components for Unicode. 2001-02-21. Accessed 2016-09-04. GB 18030 code points Unicode byte 1 (MSB) byte 2 byte 3 byte 4 – 128 – — invalid – – except – except – – – – – — () reserved for future character extension – — () reserved for future ideographic extension unassigned — – – – – – – – — () reserved for future standard extension – — () user-defined — invalid Total
The one- and two-byte code points are essentially GBK with the euro sign, PUA mappings for unassigned/user-defined points, and vertical punctuations. The four byte scheme can be thought of as consisting of two units, each of two bytes. Each unit has a similar format to a GBK two byte character but with a range of values for the second byte of 0x30–0x39 (the ASCII codes for decimal digits). The first byte has the range 0x81 to 0xFE, as before. This means that a string-search routine that is safe for GBK should also be reasonably safe for GB18030 (in much the same way that a basic byte-oriented search routine is reasonably safe for EUC).
This gives a total of 1,587,600 (126×10×126×10) possible 4-byte sequences, which is easily sufficient to cover Unicode's 1,112,064 (17×65536 − 2048 surrogates) assigned, reserved, and noncharacter code points.
Unfortunately, to further complicate matters there are no simple rules to translate between a 4-byte sequence and its corresponding code point. Instead, codes are allocated sequentially (with the first byte containing the most significant part and the last the least significant part) only to Unicode code points that are not mapped in any other manner. For example:
U+00DE (Þ) → 81 30 89 37 U+00DF (ß) → 81 30 89 38 U+00E0 (à) → A8 A4 U+00E1 (á) → A8 A2 U+00E2 (â) → 81 30 89 39 U+00E3 (ã) → 81 30 8A 30
An offset table is used in the WHATWG and W3C version of GB 18030 to efficiently translate code points. ICU and glibc use similar range definitions to avoid wasting space on large sequential blocks.
Support
Encoding GB18030 has been supported on Windows since the release of Windows 95, as code page 54936. Windows 2000 and XP offer a GB18030 Support Package. The open source PostgreSQL database supports GB18030 through its full support for UTF-8, i.e. by converting it to and from UTF-8. Similarly Microsoft SQL Server supports GB18030 by conversion to and from UTF-16.