[fpc-pascal] Case insensitive comparison of strings with non-ascii characters
JoshyFun
joshyfun at gmail.com
Tue Jul 21 23:39:17 CEST 2009
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 or in the worst case a "general case"
unfolding could be added to FPC as a fallback mechanism. This function
requires quite large tables and a non trivial amount of CPU (based in
the amount of folded code points).
Try to do the same with WideStrings instead UTF8.
--
Best regards,
JoshyFun
More information about the fpc-pascal
mailing list