GNU bug report logs -
#12783
info for sort has an illogical example
Previous Next
Reported by: "Kevin O'Gorman" <kogorman <at> gmail.com>
Date: Fri, 2 Nov 2012 00:15:01 UTC
Severity: normal
Tags: moreinfo
Done: Assaf Gordon <assafgordon <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
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.
[Message part 2 (text/html, inline)]
This bug report was last modified 6 years and 211 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.