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

Jonas Maebe jonas.maebe at elis.ugent.be
Tue Mar 8 16:50:19 CET 2016

MARCOU Gilles wrote on Tue, 08 Mar 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.

That's indeed correct!


More information about the fpc-pascal mailing list