From: "David Gallardo" <dgallardo@mediaone.net>
> As a practical matter, you need to take the diacritics into account when
> sorting, even in English where they (may or may not) have linguistic
> significance, otherwise you'll get nondeterministic behaviour. In other
> words, résumé and resume should fall together, but always in the same
order.
Well, sort of. The issue remains that if one is choosing for their
particular purpose to ignore case (for example) then there is literally no
difference between "Aa" and "aA". Since the two are considered equivalent in
the "case insensitive" comparison, you cannot claim that a sorting algorithm
has errored if it arbitrarily returns one before the other because it
happens to return them in different order.
For a real-world example, this can happen with algorithms where the bottom
item and the anchor are always reordered if b < a and thus you could see
different ordering of items depending on their placement in the list.
A similar thing happens with accent-insensitive sorts -- if you literally
treat "ee" and "éé" as identical due to using an accent insensitive sort,
then the ordering is NOT deterministic, nor is it supposed to be. And there
is nothing invalid in there not being a non-deterministic behavior of
equivalent items, any more than claiming that having it put "ee" before "ee"
in one case and after another is invalid.
MichKa
Michael Kaplan
Trigeminal Software, Inc.
http://www.trigeminal.com/
This archive was generated by hypermail 2.1.2 : Fri Sep 07 2001 - 15:20:34 EDT