Unified Hangul Code


Unified Hangul Code, or Extended Wansung, also known under Microsoft Windows as Code Page 949, is the Microsoft Windows code page for the Korean language. It is an extension of Wansung Code to include all 11172 Hangul syllables present in Johab. This corresponds to the pre-composed syllables available in Unicode 2.0 and later.
Wansung Code has the drawback that it only assigns codes for the 2350 precomposed Hangul syllables which have their own KS X 1001 codepoints, and requires others to use eight-byte composition sequences, which are not supported by some partial implementations of the standard. UHC resolves this by assigning single codes for all possible syllables constructed using modern jamo, by making assignments outside of the encoding space used for KS X 1001.
The lead byte range is extended to 0x81–FE, and the trail byte range is extended to 0x41–5A, 0x61–7A and 0x81–FE. The codes outside the EUC-KR ranges are used for the additional hangul.

Terminology

Unified Hangul Code is not registered with IANA as a standard to communicate information over the Internet. Alternatives include UTF-8. However, the W3C/WHATWG Encoding Standard used by HTML5 incorporates the Unified Hangul Code extensions into its definition of "EUC-KR".
Microsoft assigns Windows-949 the label "ks_c_5601-1987", which properly applies to KS X 1001 itself. The WHATWG treat the label "ks_c_5601-1987" interchangeably with "EUC-KR" with the intent of being "compatible with deployed content". The Unicode Consortium's "OBSOLETE/EASTASIA" collection of withdrawn mappings included mappings for Unified Hangul Code as "KSC5601.TXT", with the automatically derived mappings for 7-bit KS X 1001 being included as "KSX1001.TXT".
IBM's code page 949 is another, otherwise unrelated, extension of EUC-KR. International Components for Unicode uses "cp949", "949" or "ibm-949" to refer to that IBM code page, and "ms949" or "windows-949" to refer to the Windows mapping of UHC. Python, by contrast, recognises "cp949", "949", "ms949" and "uhc" as labels for UHC, and does not include an IBM-949 codec. Out of the labels incorporating the code page number, the WHATWG recognise only "windows-949".
IBM's code page for Unified Hangul Code is called Code page 1363, or "Korean MS-Win". It is a combination of SBCS Code page 1126 and DBCS Code page 1362. It differs in having a single byte mapping of 0x5C to the Won sign ; Windows maps 0x5C to U+005C as in ASCII, although fonts often still render it as a Won sign. Unicode mapping of the wave dash also differs, with the IBM mapping favouring U+301C, while the Microsoft mapping favours U+223C. The IBM mapping for UHC is available as "ibm-1363" in ICU, whereas the ICU "windows-949" codec is referred to as IBM-1261 in some ICU source code comments.

Footnotes