[fpc-pascal] string comparison on various platforms

Geno Roupsky groupsky at gmail.com
Fri May 5 09:57:35 CEST 2006

2006/5/3, Marc Santhoff <M.Santhoff at t-online.de>:
> Hi,
> from digging the sources I know, that on Unix-like Systems the
> comparison of strings is done according to the current locale (Pascals
> "strcomp" is mapped to C-libs "strcoll").
> Can I assume that this is done similar on all other platforms, too?

At least where is is possible, I mean where the OS supports locales

I'm asking myself if I have to consider something special when sorting
> strings or if a comparison using the RTL function will allways be
> "correct" (not talking of special sort orders for rarely occuring
> cases).

Yes, if for any reason you stumble upon a bug it is most probably due to
miss configuring the OS locale definitions.

Geno Roupsky
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20060505/f60c77d3/attachment.html>

More information about the fpc-pascal mailing list