[fpc-pascal] Case insensitive comparison of strings with non-ascii characters

Luiz Americo Pereira Camara pascalive at bol.com.br
Tue Jul 21 21:26:19 CEST 2009


Luiz Americo Pereira Camara escreveu:
> JoshyFun escreveu:
>> Hello FPC-Pascal,
>>
>> Tuesday, July 21, 2009, 6:45:03 AM, you wrote:
>>
>> LAPC> I'm trying to fix bug
>> LAPC> http://bugs.freepascal.org/view.php?id=14135 but LAPC> could 
>> not get a way to do case insensitive comparison of UTF8 strings
>> LAPC> with non ascii characters (in the test even ansi strings failed).
>> Try to do the same with WideStrings instead UTF8.
>>   
>
> I tried widestringmanager.CompareTextWideStringProc('Ç', 'ç')
> It also fails.

It worked with WideCompareText(UTF8Decode(Key), UTF8Decode(Str)) where 
Key and Str are UTF8.
It did not worked in my example because the strings where not UTF8 encoded

Luiz



More information about the fpc-pascal mailing list