Subject: Re: Sort sequence

From: Dominic Dunlop <[email-masked]>
Date: Thu, 4 Apr 91 22:08:40 BST

[From "Sort sequence" dated Apr  4]
>    From: [email-masked]
>    > (Perhaps French phone books are a different `locale' than French dictionaries?!)
>    BINGO!

Surprising how difficult a point this is to grasp.
> 
> This means that you had better be able to have multiple locales per
> document, in complicated relationships.  An author index, a subject
> index, a (foreign) word index, and a geographical index to the same
> document may have different sorting rules....  A table in an
> encyclopaedia may use a different sort than the headwords.  etc.

Absolutely.  And absolutely not Unicode's problem.  Having recently had
occasion to get into tagged text as defined by ISO 8879 (SGML), I
discover that you can do this with tagged text and make it (more or
less, depending on your preference) independent of character set.
(Although SGML points to ISO 2022 for shifting from one character set
to another, which was a problem for Unicode last time I was paying
attention.) Once you've got tags specifying sort sequence (or anything
else that takes your fancy), parsing software can detect and act on
them -- presumably, in the C/POSIX universe, by calling setlocale().
>
> One locale per sort rather dilutes the notion of locale, doesn't it?

Are you suggesting that different keys in a multi-key sort should sort
in different locales?  Well, why not?  Again, you could tag the stuff to
indicate that this was what you wanted to happen.  And, I suppose that,
given fair warning, somebody could cook up an application which acted
correctly on the information.  Volunteers?

While I'm here, a quick locale story: I had occasion recently to visit
the cockpit of an Airbus A320.  In it are screens showing kilgrammes of
fuel, airspeed in knots or mach, height in feet and oil usage in quarts.
(The captain did not know whether these were US or Imperial.)  If we ever
get around to defining a UNITS locale, I think that cockpit is going to
give us problems.  No doubt other industries will present other
idiosyncracies...

-- 
Dominic Dunlop