[dev] Re: [cvs] commit: turba/lib List.php
Jan Schneider
jan at horde.org
Sun Sep 28 12:59:24 PDT 2003
Zitat von Chuck Hagenbuch <chuck at horde.org>:
> Quoting Jan Schneider <jan at horde.org>:
>
> > It has a lot of i18n implications, thus the comment before the old
> code.
> > strcoll is also case insensitive if you don't use the C locale. So the
> only
> > advantage left for strnatcasecmp is the natural sorting order for
> numbers
> > while losing the naturaly sorting order for all non-ascii chars. That
> > doesn't weigh IMO.
>
> I took a closer look, and went with a different solution that lets us set
> a
> comparison type for attributes, and figures out integer types a bit more
> flexibly, so I can get a number sort on the field I was looking at when I
> made
> this.
>
> I went back to strcoll() for text comparisons.
>
> That work for you?
Looks good. But the comment is not quite correct, strcoll is not multibyte
safe in the first place (though i hope it is), but locale safe.
Jan.
--
http://www.horde.org - The Horde Project
http://www.ammma.de - discover your knowledge
http://www.tip4all.de - Deine private Tippgemeinschaft
More information about the dev
mailing list