I'm struggeling to get global search working on strings that may (!) contain Japanese kanji characters that are represented as double-byte Shift-JIS characters.
The API documentation of FindStrInStr suggests to use TxtFindString if the International Feature Set is supported. While the API says that it matters for some strange reason that both pointers point to the start of a valid character,
Some strange reason? If your text pointer is referencing the second byte of a double byte character then it would be rather difficult for the routine to correctly process the text.
the function seems to perform just the usual case-insensitive one-byte comparasion. So it happens that if a double-byte character 0x215L is to be searched also 0x215l is found which sucks quite hard because since there just is not such a concept like "capital letters" in Japanese I have to filter all found results based on whether they found a Shift-JIS character through an own (3 line) function. This shouldn't be necessary. Or am I missing something?
I'm assuming you're running your code on a Japanese ROM, right? Otherwise the device character encoding is Latin (PalmLatin, basically CP1252) and the various text related routines throughout the OS assume that they're getting passed single-byte text.
-- Ken -- Ken Krugler TransPac Software, Inc. <http://www.transpac.com> +1 530-470-9200
-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
