Kanji Backspace

This function backspaces within text stored using the encoding scheme known as double-byte character sets (DBCS). Although other writing systems are encoded using DBCS, this problem has acquired the name Kanji Backspace.

A text string encoded in DBCS contains a mixture of single-byte and double-byte characters. Single-byte characters are the ASCII characters that many programmers are familiar with; a capital 'A' is represented by the single byte 65. Double-byte characters occupy 2 bytes in the encoding.

To tell them apart, single characters in DBCS are allowed to use only 7 bits, with the high bit off. In a double-byte character, ...

Get Find the Bug A Book of Incorrect Programs now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.