Branden Robinson wrote:
> sort(1) says:
> 
>       *** WARNING *** The locale specified by the environment affects sort
>       order.  Set LC_ALL=C to get the traditional sort order that uses native
>       byte values.
> 
> This advice is overkill.  LC_COLLATE=C is all that is necessary; newbies
> should be helped to learn that there's more to locale settings than LANG
> and LC_ALL.
> 
> Some people might have LANG or LC_MESSAGES set to some non-English language
> and it seems a shame to ram English diagnostics down their throats just
> because they want to use the One, True Collation Order and haven't learned
> how to get it yet.  Let's teach 'em to fish with a pole instead of by
> tossing sticks of dynamite into the pond.

Just recently Pádraig Brady asked this same question:

  http://lists.gnu.org/archive/html/bug-coreutils/2008-03/msg00037.html

I answered him with this:

  Because there is a priority of variables available the documentation
  would need to say set LANG, unless LC_COLLATE is set in which case set
  LC_COLLATE, unless LC_ALL is set in which case set LC_ALL.  That is
  much longer in the usage and much more confusing to users than simply
  saying set LC_ALL.  If they actually set LC_ALL then we are confident
  that they will get the setting.  It is a compromise.

  Also, I have heard of there being combinations of settings of
  character type and collating sequence that do not work together.
  Setting LC_ALL sets both but setting LC_COLLATE only sets one.  If a
  user has an incompatible LC_CTYPE then setting LC_ALL=C is is okay but
  setting just LC_COLLATE=C is not safe.  Unfortunately I am not
  knowledgeable about this problem enough to know if this is real or
  simply FUD.  If anyone knows how this really works and would care to
  educate me I would appreciate it.  But again setting LC_ALL avoids
  giving advice which might actually cause problems.

I am not the maintainer but I didn't hear opposition to the above
rationale.  I would happily entertain a discussion on the upstream
mailing list on this issue.

I don't think the present condition is cast in concrete.  It is just a
best judgement of how long to make the usage message and how much
information to provide there.  The usage message becomes the man page
through help2man.  And of course the info documentation includes a
full description.

If you have suggestions for improvements to the wording I am sure they
would be seriously considered.

Bob


Reply via email to