Subject: Re: bug#12783: info for sort has an illogical example

From: Bob Proulx <[email-masked]>
Date: Fri, 2 Nov 2012 12:07:28 -0600

Kevin O'Gorman wrote:
> (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.

I also agree that the above is needlessly disjoint.  It doesn't flow.

Would you be able to suggest an improvement to the wording that would
make it better than the current prose?  Of course a submission as a
patch would be great.  Using git patch submissions is the preferred
format.  But just saying what you think it should say would also be
appreciated.

Bob