
582
|
Chapter 9: Information Processing Techniques
e reverse conversion (Row-Cell to ISO-2022) uses the following assignment
statements:
p1 += 32;
p2 += 32;
ISO-2022 and Row-Cell are related more closely than you would think. ey are dierent
only in the fact that ISO-2022 is the encoded value, which does not happen to begin at
value 1, and that Row-Cell represents an encoding-independent way of indexing char-
acters within the 94×94 character matrix. e only soware system I know of that pro-
cesses CJKV characters by Row-Cell values is the Japanese version of T
E
X, a typesetting
language. For other systems it is simply not very ecient or practical to process Row-Cell
codes internally.
Conversion Between ISO-2022-JP and Shift-JIS
e ability to convert between ISO-2022-JP and Shi-JIS encodings is fundamental for
most soware that is designed to support Japanese. Half-width katakana, which can be
represented in Shi-JIS encoding, have no ocial representation in ISO-2022-JP encod-
ing. As with conversion from EUC-JP, I suggest that these characters be converted into
their full-width counterparts.
ISO-2022-JP to Shift-JIS conversion
Conversion from ISO-2022-JP to Shi-JIS requires the use of the following conversion
algorithm, given in C code, or its equivalent. A call to this function must pass variables for
both bytes to be converted, and pointers are used to return the values ...