[TOC] [PREV] [NEXT] DECwindows Motif Supplemental Guide for Korean Support

2. Codesets

DECwindows Motif supports the following Korean codesets:

2.1. DEC Korean

The ASCII and KS C 5601 character sets are combined to form the DEC Korean codeset.

DEC Korean use a two-byte data representation for symbols and ideographic characters defined in KS C 5601. To differentiate KS C 5601 codes from ASCII codes, the most significant bit (MSB) of the first byte and the second byte of a KS C 5601 character is always set on.

Figure 2-1. Representations of ASCII and two-byte characters

ASCII  0      
 
KS C 5601  1     1  
   First Byte  Second Byte

The first byte of a two-byte code determines its row number, while the second determines its column number.

The following formula illustrates the code of a two-byte KS C 5601 character in relation to its row and column numbers.

1st byte = A0 + Row number
2nd byte = A0 + Column number

For example, if a character is positioned at the first column of the 36th row, its encoding value can be calculated as follows:

1st byte = A0(hex) + 36 = C4(hex)
2nd byte = A0(hex) + 01 = A1(hex)

that is, C4A1.

Figure 2-2. Code space for KS C 5601

   Second Byte
  00 20 80 A0 FF
First 
Byte 
20  
80        
A0  
FF       KS C 5601

Figure 2-2 illustrates the division of a two-byte code space and the position of KS C 5601 characters.

2.2. Korean EUC

Extended UNIX Code (EUC) is the codeset system extended by AT&T Bell Laboratories for use by various countries in the world. Korean EUC is the EUC codeset for representing Korean data. The encoding of Korean EUC is currently identical to that of DEC Korean. If you want to use Korean EUC, use DEC Korean instead.