KS X 1001


KS X 1001, "Code for Information Interchange ", formerly called KS C 5601, is a South Korean coded character set standard to represent Hangul and Hanja characters on a computer.
KS X 1001 is encoded by the most common legacy character encodings for Korean, including EUC-KR and Microsoft's Unified Hangul Code. It contains Korean Hangul syllables, CJK ideographs, Greek, Cyrillic, Japanese and some other characters.
KS X 1001 is arranged as a 94×94 table, following the structure of 2-byte code words in ISO 2022 and EUC. Therefore, its code points are pairs of integers 1–94. However, some encodings, in addition to providing codes for every code point, provide additional codes for characters otherwise representable only as code point sequences.

History

This standard was previously known as KS C 5601. There have been several revisions of this standard. For example, there were revisions in 1987, 1992, 1998 and 2002.
The present, double-byte, Wansung character set was standardised by the third edition of KS C 5601, which was published in 1986. It is an ISO 2022 compatible encoding, typically used in EUC form, which assigns double-byte codes for non-Hangul, Hangul jamo, and the most common Hangul syllables, in contrast to Johab which is not compatible with ISO 2022, but assigns double-byte codes to all Hangul syllables using modern jamo. Wansung is technically a variable-length encoding, allowing other syllables to be represented with eight-byte sequences, but this feature is not always implemented.
The earliest edition of KS C 5601, published in 1974, defined a variable-length 7-bit character set which assigned single-byte code points to 51 basic Hangul jamo, somewhat analogously to JIS C 6220, in an encoding known as "N-byte Hangul". The second edition, published in 1982, retained the main character set from the 1974 edition but defined two supplementary sets, including a version of Johab. Neither edition was adopted as widely as intended.
Wansung was kept unchanged in the 1987 and 1992 editions. In the 1992 edition, additional annex material was added, including the definition of the Johab encoding in annex 3, and the older N-byte Hangul encoding in annex 4. It was published in response to industry use of Johab as a competing encoding to Wansung, being used at the time by Hangul Word Processor. Following the introduction of Unified Hangul Code by Microsoft in Windows 95, and Hangul Word Processor abandoning Johab in favour of Unicode in 2000, Johab ceased to be commonly used.

Encodings

Encoding schemes of KS X 1001 include EUC-KR and ISO-2022-KR, as well as ISO-2022-JP-2. These all have the drawback that they only assign codes for the 2350 precomposed Hangul syllables which have their own KS X 1001 codepoints, and require others to use eight-byte composition sequences, which are not supported by some partial implementations of the standard.
The Johab encoding and the EUC-KR superset known as Unified Hangul Code provide single codes for all 11172 Hangul syllables. ISO-2022-KR and Johab are rarely used. Some operating systems extend this standard in other non-uniform ways, e.g. the EUC-KR extensions MacKorean on the classic Mac OS, and IBM-949 by IBM.

Hangul Filler

The Hangul Filler character is used to introduce eight-byte Hangul composition sequences and to stand in for an absent element in such a sequence.
Unicode includes the Wansung code Hangul Filler in the Hangul Compatibility Jamo block for round-trip compatibility, but uses its own system for composing Hangul. The KS X 1001 Hangul composition system is not used in Unicode, and the filler renders merely as an empty space; KS X 1001 composition sequences using modern jamo may be mapped to precomposed characters in Unicode. This is not usually done with Unified Hangul Code.
For round-trip compatibility, Unicode also includes the N-byte Hangul code Hangul Filler separately in the Halfwidth and Fullwidth Forms block, named the "Halfwidth Hangul Filler".

Wansung code charts

Following are the code charts for KS X 1001 in Wansung layout. Where a pair of hexadecimal numbers is given, the smaller is used when encoded over GL, as in ISO-2022-KR when the Korean set has been shifted to, and the larger is used in the more typical case of it being encoded over GR, as in EUC-KR or UHC. Johab changes the arrangement to encode all 11172 Hangul clusters separately and in order.
To illustrate vendor differences in implementation, multiple Unicode mappings are shown for some characters. Apple's HangulTalk extensions to the Wansung plane are shown, but other HangulTalk extension ranges are not. The additional codes for composed syllables in Unified Hangul Code, and IBM's extensions in IBM-949, are also not shown, since both fall outside of the Wansung plane.

Lead bytes

Non-Hanja non-precomposed sets

The rows 41 and 94 may be used for user-defined purposes.

Character set 0x21 / 0xA1 (row number 1, special characters)

This set contains punctuation and other symbols, excluding punctuation present in KS X 1003. Encodings which combine KS X 1001 with single-byte ASCII may use alternative Unicode mapping to the Halfwidth and Fullwidth Forms block for the backslash. Unicode mapping of the wave dash also differs between vendors, and may be U+301C or U+223C. Compare the similar but not identical handling of the JIS wave dash, and the handling of the tilde in the next row.
Except for the backslash, if two mappings are shown below, the first is used by Apple and the second is used by Microsoft.

Character set 0x22 / 0xA2 (row number 2, special characters)

This set contains additional punctuation and symbols. Similarly to the tilde character in the previous row, different mappings are used by Apple and Microsoft for the tilde character in this row, which is intended to be shown as a raised tilde, whereas the tilde in the previous row is intended to be shown in-line at dash height. Mapping of the circled dot also differs.
The euro and registered trademark sign were added to the standard in 1998, while the Korean postal mark was added in 2002. These three code points, as with the still-unused code points, have been put to use for other, non-standard, purposes by vendors, e.g. for boxed list markers by Apple. Microsoft updated its Unified Hangul Code implementation to add the 1998 additions including the euro sign, but did not add the Korean postal mark when it was added to the standard.

Character set 0x23 / 0xA3 (row number 3, basic Latin / ISO 646-KR)

This set corresponds to KS X 1003, but as two-byte codes preceded by 0x23. It includes the English alphabet / Basic Latin alphabet, western Arabic numerals and punctuation.
Compare the Roman set of JIS X 0201, which differs by including a Yen sign rather than a Won sign. Contrast the third rows of KPS 9566 and of JIS X 0208, which follow the ISO 646 layout but only include letters and digits.
Encodings such as EUC-KR and UHC combine KS X 1001 with single-byte ASCII or KS X 1003, and hence use alternative Unicode mappings to the Halfwidth and Fullwidth Forms block for the double-byte representations of these characters.

Character set 0x24 / 0xA4 (row number 4, Hangul jamo)

This set includes modern Hangul consonants, followed by vowels, both ordered by South Korean collation customs, followed by obsolete consonants. When used individually, these characters map to the Unicode Hangul Compatibility Jamo block, and do not have a one-to-one mapping with the position-specific characters in the Hangul Jamo block. Compare with row 4 of the North Korean KPS 9566. Character 04-52 is a Hangul Filler, used in combining sequences.

Character set 0x25 / 0xA5 (row number 5, Roman numerals and Greek)

This set contains Roman numerals and basic support for the Greek alphabet, without diacritics or the final sigma. Apple includes some additional punctuation in this row, as well as some black circled list markers continuing from those in row 6.
Contrast row 6 of KPS 9566, which includes the same characters but in a different layout.

Character set 0x26 / 0xA6 (row number 6, box drawing)

This row contains characters for drawing boxes in a semigraphic context. Apple also includes some black circled list markers.

Character set 0x27 / 0xA7 (row number 7, unit symbols)

This row contains unit symbols as single characters, including those which consist of multiple letters. Apple also includes some circled list markers continuing from those in row 8.
Compare and contrast with the repertoire of unit symbols included in row 8 of KPS 9566.

Character set 0x28 / 0xA8 (row number 8, extended Latin, encircled, fractions)

Character set 0x29 / 0xA9 (row number 9, extended Latin, encircled, superscript and subscript)

Character set 0x2A / 0xAA (row number 10, Hiragana)

This set contains Hiragana for writing the Japanese language. Apple also includes some bracketed list markers continuing from those in row 9.
Compare row 10 of KPS 9566, which uses the same layout. Compare and contrast row 4 of JIS X 0208, which also uses the same layout, but in a different row.

Character set 0x2B / 0xAB (row number 11, Katakana)

This set contains katakana for writing the Japanese language. However, the Japanese long vowel mark, which is used in katakana text and included in row 1 of JIS X 0208, is not included. Apple also includes some bracketed list markers continuing from those in rows 9 and 10.
Compare row 11 of KPS 9566, which uses the same layout. Compare and contrast row 5 of JIS X 0208, which also uses the same layout, but in a different row.