Forum OpenACS Q&A: Response to Case insensitive sort in bboard??

Collapse
Posted by Barry McMullin on
Hmmm yes, thanks Don ... the locale setting is surely implicated here.

The setting is thus:

  LC_ALL=en_IE

which *should* be right for where I am (i.e., Ireland).

So I created a dummy text file with lines starting a, b, c, A, B, C
and sorted it with the standard sort command; works as expected (order is A, B, C, a, b, c); but now I try with "sort -l" (which,
according to man, tells sort to use locale support).  Now the
order comes out as A, a, B, b, C, c.

This suggests the problem is with that particular locale setting; but I went on to try en_GB and en_US (!); they gave exactly the same
behaviour.  Finally I tried just "en" and then the order reverted to
the expected!

So OK, I guess it is clear that this is not really an OpenACS issue
... but if anyone has any comments on what is going on here (i.e.
why the locales might have been designed to sort in such a harebrained
way) I'd still appreciate hearing about it...

Thanks again,

- B.