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 Tilde#Unicode and [Shift JIS encoding of wave dash|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.

Character set 0x2C / 0xAC (row number 12, Cyrillic)

This set contains the modern Russian alphabet, and is not necessarily sufficient to represent other forms of the Cyrillic script. Apple also includes some black boxed list markers.
Compare row 5 of KPS 9566 and row 7 of JIS X 0208, which use the same layout.

Extended character set 0x2D / 0xAD (row number 13, Apple additional punctuation)

Precomposed Hangul sets (rows number 16 through 40)

Code points for precomposed Hangul are included in a continuous sorted block between code points 16-01 and 40-94 inclusive. Not all possible syllable clusters are included in this range. Compare the different ordering and availability in KPS 9566.
Initial+vowel+final syllables 뢨, 썅, 쏀, 쓩, and 쭁 are included but their initial+vowel counterparts 뢔, 쌰, 쎼, 쓔, and 쬬 are not. This can cause a problem with inputting, because input methods have to go through an initial+vowel syllable first in order to get to an initial+vowel+final syllable.
Those which are not listed here may be represented using eight-byte composition sequences. All other modern-jamo clusters are assigned codes elsewhere by UHC. All possible modern-jamo clusters are assigned codes by Johab.

Statistics by jamo

Hanja sets (rows number 42 through 93)

KS X 1001 encodes hanja with multiple pronunciations multiple times, once for each pronunciation. One character, 樂, is encoded four times. The first 268 characters in the CJK Compatibility Ideographs block correspond to these duplicates.
In the table below, the first row-cell value for each Hanja maps to the CJK Unified Ideographs block; others map to the CJK Compatibility Ideographs block.
HanjaLocations and readings
42-25, 45-47
43-29, 90-02
44-24, 90-70
44-58, 43-54
44-88, 48-48
45-90, 46-13
46-09, 92-09
47-03, 47-91
47-47, 48-02, 48-24
49-34, 43-48
49-49, 48-61
49-57, 52-92
49-71, 53-11
50-15, 49-53
50-19, 69-92
50-20, 70-36
50-21, 70-42
50-22, 70-60
50-23, 70-86
50-26, 70-87
50-27, 54-24, 71-12
50-33, 54-45
尿50-67, 72-81
50-78, 74-84
50-79, 75-10
50-90, 76-18
50-91, 76-41
50-92, 76-42
50-94, 83-17
51-01, 53-14
51-56, 87-24
51-75, 87-40
51-88, 86-84
52-33, 52-70
52-55, 87-51
52-90, 49-52
52-91, 49-56
52-93, 49-59
52-94, 49-60
53-01, 49-61
53-02, 49-62
53-03, 49-63
53-04, 49-64
53-06, 49-67
53-07, 49-68
53-08, 49-69
53-10, 49-70
53-12, 49-72
53-13, 49-73
53-15, 49-74
53-16, 49-75
53-17, 49-77
53-20, 49-79
53-21, 49-80
53-22, 49-82
53-25, 49-86
53-29, 49-90
53-32, 49-92
53-33, 49-93
53-35, 49-94
53-36, 50-02
53-37, 50-03
53-38, 50-07
53-39, 50-08
53-40, 50-09
53-41, 50-10
53-45, 50-11
53-46, 50-13
53-50, 50-18
53-51, 69-17
53-52, 69-18
53-53, 69-25
53-55, 69-27
53-56, 69-28
53-57, 69-36
53-61, 69-46
53-62, 69-48
53-63, 69-50
53-65, 69-54
53-68, 69-90
53-69, 69-91
53-70, 69-94
53-73, 70-01
53-75, 70-04
53-76, 70-07
53-79, 70-13
53-81, 70-15
53-82, 70-16
53-83, 70-17
53-84, 70-19
53-85, 70-23
53-86, 70-24
53-89, 70-28
53-91, 70-38
53-92, 70-39
53-94, 70-50
54-01, 70-54
54-02, 70-57
54-03, 70-63
54-04, 70-65
54-05, 70-69
54-06, 70-68
54-07, 70-70
54-08, 70-72
54-10, 70-74
54-11, 70-75
54-13, 70-79
54-14, 70-81
54-15, 70-85
54-17, 70-89
54-19, 71-01
54-20, 71-06
54-21, 71-09
54-23, 71-10
54-26, 71-13
54-27, 71-16
54-28, 71-31
54-30, 71-38
54-32, 71-39
54-34, 71-43
54-35, 71-45
54-36, 71-47
54-37, 71-48
54-39, 71-51
54-41, 71-63
54-42, 71-68
54-43, 71-70
54-44, 50-30
54-47, 50-34
54-48, 50-35
54-51, 50-36
54-52, 50-38
54-53, 50-39
54-54, 50-40
54-55, 50-41
54-56, 50-42
54-58, 50-43
54-59, 50-45
54-60, 50-46
54-62, 50-47
祿54-63, 50-48
54-64, 50-49
54-65, 50-50
54-66, 50-51
鹿54-67, 50-52
54-69, 50-53
54-70, 50-54
54-71, 50-55
54-75, 50-57
54-76, 50-58
54-79, 50-62
54-80, 50-63
54-81, 50-65
54-84, 50-66
54-85, 72-71
54-86, 72-72
54-87, 72-80
54-89, 72-87
54-90, 72-91
54-91, 72-94
54-94, 73-07
55-01, 73-12
55-03, 73-44
55-04, 50-68
55-06, 50-69
55-07, 50-70
55-08, 50-71
55-09, 50-72
55-11, 50-73
55-12, 50-74
55-16, 50-75
55-17, 74-69
55-19, 74-87
55-21, 74-92
55-22, 74-94
55-24, 75-04
55-26, 75-07
55-28, 75-09
55-30, 75-26
55-31, 75-27
55-32, 75-29
55-33, 75-33
55-35, 75-34
55-36, 75-38
55-37, 75-39
55-39, 75-44
55-40, 75-47
55-41, 75-48
55-42, 75-49
55-44, 75-56
55-45, 50-80
55-46, 50-81
55-47, 50-82
55-48, 50-83
55-50, 50-84
55-51, 50-85
55-52, 50-87
55-53, 50-88
55-55, 76-06
55-57, 76-07
55-59, 76-10
55-61, 76-16
55-62, 76-17
55-66, 76-21
55-69, 76-24
55-71, 76-26
55-74, 76-32
55-75, 76-33
55-76, 76-37
55-78, 76-38
55-80, 76-53
55-82, 76-61
55-83, 76-62
55-84, 76-65
55-86, 76-68
55-87, 76-71
55-88, 76-72
55-89, 76-87
55-90, 76-88
55-92, 76-90
56-01, 77-01
56-02, 77-02
56-03, 77-03
58-82, 59-68
60-54, 61-05
60-63, 88-80
60-84, 61-53
61-33, 59-37
63-15, 65-77
63-50, 77-78
63-61, 63-65
63-67, 62-94
64-67, 65-13, 70-82
64-93, 63-72
65-67, 55-43, 75-50
66-06, 62-92
67-06, 68-09
67-59, 82-29
68-07, 82-90
68-34, 71-87
68-37, 49-66, 53-05, 72-89
69-20, 69-14
70-22, 76-15
71-08, 64-81
72-54, 74-33
76-22, 55-68
76-54, 70-76
77-09, 84-07
77-19, 78-59
79-23, 84-78
82-67, 67-85
83-19, 43-71
83-49, 63-19
84-12, 86-86
86-56, 68-01
便88-21, 60-05
88-76, 88-59
89-18, 61-84
90-28, 90-01
91-09, 71-33
92-33, 45-72
93-27, 73-87

Johab encoding

KS X 1001, since 1992, also defines an alternative encoding known as Johab. This represents a Hangul syllable as the sequence of three five-bit values, split across two 8-bit bytes, most significant bit first. The most significant bit of the lead byte is always set. This encoding is also used for the modern jamo from row 4 of KS X 1001, by using the filler values for the other components. The Johab encoding for Hangul is shown in the table below.
Johab encodes the remainder of KS X 1001 using lead bytes which do not correspond to an initial jamo, with trail bytes in the ranges 0x31–0x7E and 0x91–0xFE. These codes are algorithmically mapped from the characters' KS X 1001 code points, with two KS X 1001 rows per lead byte.
The ASCII-based Johab encoding is numbered Code page 1361 by Microsoft. Other, vendor-defined, Johab variants also exist; for example, IBM defines one for use as a Shift Out set with EBCDIC. That variant uses shift in and shift out to switch between a single-byte EBCDIC page and Johab, uses a different encoding for the non-Hangul characters, and uses lead bytes 0xD4–DD as a user-defined region, but uses the same Johab layout as the 1992 standard for the Hangul characters when in shift-out state. IBM number the EBCDIC-based, stateful Johab encoding Code page 1364, and also define a subset of that encoding, including fewer Hangul characters but in the same layout, as Code page 933.
Some other vendors such as Samsung or GoldStar used other "Johab" encodings where the mappings of five-bit codes to jamo differ from the below, consequently not being compatible with the 1992 standard Johab. The table below corresponds to the 1992 standard and also to IBM usage.
Five-bit sequenceAs initialAs vowelAs final
00000not usednot usednot used
00001fillernot usedfiller
00010filler
00011
00100
00101
00110
00111
01000not used
01001not used
01010
01011
01100
01101
01110
01111
10000not used
10001not used
10010not used
10011
10100
10101not used
10110non-Hangul lead bytes
10111non-Hangul lead bytes
11000non-Hangul lead bytesnot used
11001non-Hangul lead bytesnot used
11010non-Hangul lead bytes
11011non-Hangul lead bytes
11100non-Hangul lead bytes
11101non-Hangul lead bytes
11110non-Hangul lead bytesnot usednot used
11111not usednot usednot used

N-byte Hangul code

This is the N-byte Hangul code, as specified by KS C 5601-1974 and by annex 4 of KS C 5601–1992. The second half of IBM's Code page 1040 is a superset of this, assigning the characters ¢¬\~ to the same locations as in Code page 1041, while the unextended N-Byte Hangul is Code page 891. Character 0x40/0xC0 is a Hangul Filler, used in combining sequences.
Similarly to its Japanese counterpart JIS C 6220, N-byte Hangul code could be used as a 7-bit encoding, with character allocations over the range 0x40 through 0x7C. The chart below shows the code in an 8-bit environment with the high bit set, as it is used in e.g. code page 891 or 1040.