[fpc-pascal] Case insensitive comparison of strings with non-ascii characters
theo
xpde at theo.ch
Sat Jul 25 19:03:18 CEST 2009
>> if SLen1 <> SLen2 then //Assuming lower/uppercase representations
>> have the same byte length
>
> That is a wrong assumption. E.g., the lowercase version of I
> (uppercase i, a single byte) in Turkish is ı (an "i" without a dot,
> definitely not a single-byte character).
OK thanks. That's why I added the comment, because I was not sure ;-)
So then one should compare UTF8Lengths or probably forget that shortcut,
because calculating UTF8Lengths is not cheap.
Do turkish systems behave differently for WideLowerCase('I')?
Will they return $0131 instead of $0069 ?
Regards Theo
More information about the fpc-pascal
mailing list