[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#12783: info for sort has an illogical example
From: |
Kevin O'Gorman |
Subject: |
bug#12783: info for sort has an illogical example |
Date: |
Thu, 1 Nov 2012 15:38:40 -0700 |
This is just a quibble, but I'm really wanting to understand locales and
sort.
In the footnotes of the info page for sort invocation, I find the following
in a footnote:
(reformatted and numbered)
A, In that case, set the `LC_ALL' environment variable to `C'.
B. Note that setting only `LC_COLLATE' has two problems.
B1. First, it is ineffective if `LC_ALL' is also set.
B2. Second, it has undefined behavior if `LC_CTYPE' (or `LANG', if
`LC_CTYPE' is unset) is set to an incompatible value.
B2x. For example, you get undefined behavior if `LC_CTYPE' is `ja_JP.PCK'
but `LC_COLLATE' is `en_US.UTF-8'.
The example in B2x is illogical since A and B together mean we're setting
LC_COLLATE to C, not some random value like en_US.UTF-8.
I want to know if LC_COLLATE=C can be messed up by an LC_CTYPE setting, or
anything besides LC_ALL. I'm writing software that will use sort
extensively in unknown environments, and I'd like to keep all adjustments
as localized as possible. So far, setting the collating sequence to POSIX
is all that I need; no other locale adjustments.
--
Kevin O'Gorman
programmer, n. an organism that transmutes caffeine into software.
- bug#12783: info for sort has an illogical example,
Kevin O'Gorman <=