Almost all encodings. In Japanese (Shift-JIS encoding) the 0x5C character is a yen sign, not a back-slash.> What about numbers? Is char s[10] = "-54" always the same byte string inany encoding, or is it possible that one encoding will not represent numberic characters (and/or '.', '-') the same way as ASCII?Yes, low ascii chars are identical in all encodings.
Also remember that while 'A' is represented by a single byte with the value 0x41 in all encodings, the converse case isn't true; not every byte in a string with the value 0x41 is the character 'A'. In Shift-JIS, for example, the bytes 0x83 0x41 represent a single character (Katakana 'A').
So use StrChr if you have to search a string for a specific character. Don't walk the string a byte at a time unless you either (a) know that all of the text being searched consists only of single-byte characters, or (b) the character you're searching for has a value < 0x0040, which means that it will never be part of a multi-byte character.
-- 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/
