[fpc-pascal] AnsiCompareStr question (again...)

MARCOU Gilles g.marcou at unistra.fr
Tue Mar 8 16:43:13 CET 2016

Sorry for my last post, I missed some reply. I think that I understood now the problem. Using TStringList.Sort, it uses AnsiCompareStr which needs a specific widestring manager to be defined. This is done adding the unit cwstring in the program unit (the .lpr using Lazarus). A better option, if executable size is not a concern, is to use fpwidestring, but it requires fpc 2.7.1 or more. Basically, the widestring support international characters, however this support affects characters that could be thought of as Char such as the sign « = «. A good help page is there: http://wiki.freepascal.org/Character_and_string_types <http://wiki.freepascal.org/Character_and_string_types>. Please correct if I’m wrong.

I thank you all again for your kind help,
Gilles Marcou
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20160308/5c935416/attachment.html>

More information about the fpc-pascal mailing list