
598
|
Chapter 9: Information Processing Techniques
characters are handled properly. For example, the standard (that is, unlocalized) version
of Microso Word (for Mac OS) is one of the most popular word-processing applications
ever, but at one time failed to handle two-byte characters properly.
Character Deletion
It is quite likely that you will encounter text-processing soware that deletes only one byte
of a two-byte character. ose that have been properly adapted to CJKV locales are able
to detect whether the character in front of the insertion point is represented by two bytes,
and subsequently deletes both bytes. is problem can be avoided if you remember to
press the delete key twice when dealing with two-byte characters. If you are not careful,
loss or corruption of data may result.
Let’s take a closer look at this problem. Table 9-11 provides a sample Shi-JIS–encoded
Japanese text string. e rst process that will be applied is the deletion of the last char-
acter. e rst example deletes the last character (consisting of two bytes), and the second
deletes the last byte (more precisely, the last byte of the last character). Finally, we add
another character, , at the insertion point. Note how the undeleted rst byte le over
from the second example aects the interpretation of the added character (the encoded
value of this added character is highlighted).
Character deletio ...