# Hong Kong Supplementary Character Set

The Hong Kong Supplementary Character Set (香港增補字符集; commonly abbreviated to HKSCS) is a set of Chinese characters – 4,702 in total in the initial release—used in Cantonese, as well as when writing the names of some places in Hong Kong (whether in written Cantonese or standard written Chinese sentences).
It evolved from the preceding Government Chinese Character Set (政府通用字庫) or GCCS. GCCS is a set of supplementary Chinese characters coded in the user-defined areas of the Big5 character set. It was originally used within the Hong Kong Government and later used by the public. It later evolved into Hong Kong Supplementary Character Set when the characters in the set were submitted to ISO-10646 for coding.

## History and versions

The HKSCS has gone through a few iterations.
| Version | Total characters | Big5-HKSCS characters | Publication date |
| GCCS | 3,049 | 3,049 | 1995 |
| HKSCS-1999 | 4,702 | 4,702 | 09/1999 |
| HKSCS-2001 | 4,818 | 4,818 | 12/2001 |
| HKSCS-2004 | 4,941 | 4,941 | 05/2005 |
| HKSCS-2008 | 5,009 | 5,009 | 12/2009 |
| HKSCS-2016 | 5,033 | 5,009 | 05/2017 |
| MSCS-2020 | 442 | 59 | 03/2021 |

### Big-5 extensions (1995–2009)

HKSCS versions up to HKSCS-2008 are encoded in Big5 (Big5-HKSCS, big5hk) and ISO 10646 (Unicode).

#### GCCS

Due to the inherent differences between standard written Chinese and written Cantonese, the Government of Hong Kong recognised the need for a standardised set of proprietary characters that would allow for the streamlining of electronic communication; at the time, the Big5 Chinese encoding scheme did not contain a vast majority of these characters (some were erroneously cross-listed with similar characters).
The Government Chinese Character Set (政府通用字庫) or GCCS was thus developed by the government. The character set consists of Chinese characters commonly used in Hong Kong. Some characters are Cantonese-specific, while some are alternative forms of characters. The set is not well-organised and the characters are not closely examined.

#### HKSCS-1999

Subsequently, the HKSCS-1999 (HKSCS 1999 specification) was developed. 106 GCCS characters were removed in HKSCS-1999 as a result of unification, and their Big5 code points are reserved for compatibility.
Retired "not verifiable" GCCS characters are found in UTC Sources (UTC-00877–UTC-00898), where they are sourced from Adobe-CNS1-1, an Adobe-CNS1 supplement implemented to support GCCS.

#### HKSCS-2001 and HKSCS-2004

Following the acceptance of HKSCS-1999, newer revisions were released in 2001 (adding 116 new characters) and in 2004 (adding 123 new characters), totalling 4,941 characters.
Starting from HKSCS-2004, all characters previously using the Private Use Area (PUA) section of Unicode (via Microsoft's mapping of the Unicode PUA over the private-use ranges of Big5) are remapped, with many of them reassigned to characters in the Supplementary Ideographic Plane, such as in the CJK Unified Ideographs Extension B or CJK Compatibility Ideographs Supplement Unicode blocks. However, to preserve compatibility with programs that generated PUA code points, the already-allocated code points are reserved, and no new characters will be mapped to the private use area.

#### HKSCS-2008

Since around 2005, many Hong Kong and Macau websites have switched encoding from Big5-HKSCS to Unicode, including HKGolden.
The last edition of HKSCS to encode all of its characters in Big5 was HKSCS-2008.

### Unicode subsets (2015 onwards)
#### HKSCS-2016

By 2015, efforts were underway in Hong Kong to migrate away from Big5-HKSCS and towards a defined subset of Unicode, at the time tentatively termed the Hong Kong Character Set (HKCS). This was planned to be published by the end of 2015 as "HKCS-2015", and to have four parts differentiated by different Unihan source prefixes:
* Source prefix H followed by Big5 hexadecimal: character repertoire of HKSCS-2008 in the narrow sense
* Source prefix HB followed by Big5 hexadecimal: character repertoire of Big5-ETEN
* Source prefix HC followed by a four-digit decimal incremental accession number: post-2008 vertical extensions (i.e. newly submitted CJK Unified Ideographs)
* Source prefix HD followed by hexadecimal Unicode code point: post-2008 horizontal extensions (i.e. the addition of a Hong Kong reference glyph and source reference to an existing CJK Unified Ideograph)
In particular, 22 horizontal extensions were already planned for inclusion as of June 2015. These were all minor variants of existing Big5 characters containing the 昷/𥁕, 兑/兌 and 吿/告 components, for which Hong Kong font conventions were closer to those of mainland China than to those of Taiwan, but for which the preferred versions had been encoded separately from the Big5 versions in the Unified Repertoire and Ordering due to the source separation rule. Of these 22 characters, 14 were considered "core" characters for Hong Kong use.
By November, a total of 78 requested additions to HKSCS had been received by the Hong Kong government, all of which already existed in Unicode. By this point, the planned horizontal extension was being referred to as an "HKSCS" version, rather than as "HKCS". Ultimately, HKSCS-2016 added a total of 24 characters relative to HKSCS-2008, 22 of which were the source-separated variants of existing Big5 characters. Since all 24 characters already existed in Unicode, all received a source reference prefixed with HD; the HC source prefix was not used.
As such, the characters added in HKSCS-2016 are referenced to Unicode only, and were not added to the Big5 extension.

#### Macao Supplementary Character Set

Similarly to Hong Kong's situation, there are also characters that are needed by Macau but included in neither Big5 nor HKSCS, hence, the Macao Supplementary Character Set was developed, building on HKSCS with additional Unicode-mapped characters. The first batch of 121 MSCS characters were submitted for addition to or horizontal extension in Unicode (as appropriate) in 2009. At the time, the term Macao Information Systems Character Set (MISCS) was in use for the entire character set, while "MSCS" referred more narrowly to the additional characters only.
The first final version of MSCS, MSCS-2020, was established in 2021, and uses the following Unihan source prefixes. Although the potential scope of these source prefixes collectively comprises a superset of HKSCS-2016, "MSCS" in a strict sense does not cover the Big5 or HKSCS characters (since it is intended to be combined with HKSCS) except those which are used as base characters for ideographic variation sequences.
* Source prefix MA followed by Big5 hexadecimal: character repertoire of HKSCS-2008 in the narrow sense (same as H)
* Source prefix MB followed by level number and Big5 hexadecimal: character repertoire of Big5-ETEN (same as HB)
* Source prefix MC followed by a five-digit decimal incremental accession number: Macau-specific vertical extensions. This prefix had initially been MAC in 2009, but was shortened to MC for vertical extensions in 2020, while horizontal extensions had their source references replaced with MD references.
* Source prefix MD followed by hexadecimal Unicode code point: Macau-specific horizontal extensions
* Source prefix MDH followed by hexadecimal Unicode code point: horizontal extensions from HKSCS-2016 (same as HD)
* Source prefix ME followed by hexadecimal Unicode code point and a three-digit decimal number: used for variation sequences registered in the Ideographic Variation Database (IVD)

## Compatibility
### Operating systems

In Microsoft Windows 98, NT 4.0, 2000, XP, HKSCS support can be enabled using Microsoft's patch. In Microsoft's implementation, application using code page 950 automatically uses a hidden code page 951 table for the Big5 encoding of the HKSCS extensions. The table supports all code points in HKSCS-2001, except for the compatibility code points specified by the standard. In addition, the MingLiU font is altered using Microsoft's patch. This patch is known to create conflicts in applications such as Microsoft Office, or any application using fonts supporting simplified Chinese characters (e.g.: SimSun). If the target environment contains custom font mapped to the code points affected by Microsoft's patch, the custom fonts can undo Microsoft's patch. Furthermore, the patch breaks EUDC Editor supplied with the affected versions of Windows. Starting with Windows Vista, HKSCS-2004 characters are only supported as Unicode 4.1 or later; however, HKSCS-2001 and HKSCS-1999 characters are supported as Big5-HKSCS and Unicode, but Big5-HKSCS is available only if set "Language for non-Unicode programs" to "Hong Kong" or "Macau". All characters are assigned standard, non-PUA codepoints. The characters are displayed with the MingLiU font, and these characters can be entered via the keyboard. The patch that provides Big5 encoding of HKSCS is unsupported in Windows Vista and later. A utility provided by Microsoft is available to convert HKSCS and Unicode PUA-encoded characters to Unicode 4.1 version. In 2010, Microsoft published a HKSCS-2004 patch for Windows XP and Windows Server 2003. It replaces Windows XP version of MingLiU, PMingLiU, and MingLiU_HKSCS (if HKSCS-2001 patch was applied) with Windows 7 version of MingLiU, PMingLiU and MingLiU_HKSCS. In addition, MingLiU-ExtB, MingLiU_HKSCS-ExtB and PMingLiU-ExtB fonts will be added onto target system. However, IME is not updated as it was in the case of HKSCS-2001 patch, and the fonts are from pre-release of Windows 7. For earlier versions of the OS, HKSCS support requires the use of Microsoft's patch, or the Hong Kong government's Digital 21's utilities.
IBM assigns CCSID 5471 to the HKSCS-2001 Big5 code page (with CPGID 1374 as CCSID 5470 as the double byte component), CCSID 9567 to the HKSCS-2004 code page (with CPGID 1374 as CCSID 9566 as the double byte component), and CCSID 13663 to the HKSCS-2008 code page (with CPGID 1374 as CCSID 13662 as the double byte component), while CCSID 1375 (with CPGID 1374 as CCSID 1374 as its double byte component) is assigned to a growing HKSCS code page, currently equivalent to CCSID 13663.
HKSCS support was added to glibc in 2000, but it has not been updated since then. HKSCS-2004 support is handled as Unicode 4.1 and later. For freedesktop.org setup, AR PL ShanHeiSun Uni font fully supports HKSCS-2004 since 0.1-0.dot.1, with latest revision of HKSCS-2004 supported in version 0.1.20060903-1. Modern desktop distributions (e.g. Ubuntu) include Arphic Technology's HKSCS-compliant UKai and UMing fonts out of the box when Traditional Chinese Language support is selected during installation. They can also be installed manually at a later time.
Mac OS X 10.0–10.2 supports HKSCS-1999. 10.3–10.4 supports HKSCS-2001. Some of the letters added to HKSCS-2004 is supported via Unicode PUA in OS X 10.4. Starting with OS X 10.5, all the HKSCS-2004 characters are supported via standard Unicode 4.1 code points.

### Applications and the Web

Mozilla 1.5 and above supports HKSCS, with HKSCS-2004 support added into Gecko 1.8.1 code base. Unlike the above-mentioned patch, Mozilla uses its own code page table. However, the fix for bug 343129 does not support characters mapped to code points above Basic Multilingual Plane.
QT 3.x-based applications (e.g.: KDE) only support characters mapped to code points FFFF or lower. In QT4, characters outside BMP are supported via surrogates. Big5-HKSCS Text Codec supports HKSCS-1999 back in Qt-2.3.x, but it was too late in Qt development schedule to be officially included in the Qt-2.3.x series, so it was officially supported in Qt-3.0.1. HKSCS-2001 support was added in Qt-3.0.5.
GNOME supports HKSCS characters in Unicode ranges, except those mapped to the Basic Multilingual Plane compatibility block. Patches to support characters mapped to above Basic Multilingual Plane was introduced during Pango 1.1.
The WHATWG Encoding Standard (used by HTML5) includes HKSCS in its definition of Big5 (used even with the plain Big5 label). However, only its decoder uses all HKSCS extensions, while its encoder explicitly excludes those with lead bytes below 0xA1 (thus excluding most of the HKSCS extensions but including, for example, those inherited from Big5 ETEN). Newer browsers follow this standard, including Firefox.