[fpc-pascal] Case insensitive comparison of strings with non-ascii characters
Luiz Americo Pereira Camara
pascalive at bol.com.br
Tue Jul 21 09:06:04 CEST 2009
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).
>
> Unicode case insensitive comparations are not trivial and in fact are
> quite complex. None ansi version will work properly, so the conversion
> should be provided by the OS
AnsiCompare* functions already use the functions provided by OS through
WideStringManager but it seems it's not working (or i'm doing something
wrong)
[..]
> Try to do the same with WideStrings instead UTF8.
>
I tried widestringmanager.CompareTextWideStringProc('Ç', 'ç')
It also fails.
Using fpc 224, under windowsXP SP3
Luiz
More information about the fpc-pascal
mailing list