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

Marcou Gilles g.marcou at unistra.fr
Sat Mar 5 08:51:34 CET 2016


Hi,

in an application, I use a TStringList.Sort to sort a list of these two
words "(C-C)" and "(C=C)". When I use the same unit in another project,
the Sort function sort those two strings in revert order (on the same
computer, same system).

I checked the AnsiCompareStr value between these two string and found
that the same unit compiled into one application give the value 16 and
compiled into the other application, it return the value -28.

I am really puzzled. Does it has something to do with the
WideStringManager? I don't understand how to fix this to guarantee the
same behavior of this function at any time on any system.

Thanks in advance,
Gilles Marcou



More information about the fpc-pascal mailing list