Subject: bug#23665: spaces in keys: doc, --debug in LC_ALL=C

From: Karl Berry <[email-masked]>
Date: Tue, 31 May 2016 23:15:21 GMT

Just to verify, the surprising result is in C locale?

Yes.

    as collating rules for UTF-8 make leading spaces less significant.

Yes, which is a different problem, in itself.  Let me ask this: Are the
collation rules for en_US.UTF-8 documented or even reasonably
comprehensively described anywhere?  Or just buried in the bowels of
libc code?  I looked online and found nothing usable (surprisingly).

    I can add the above example to the documentation 

Yes please.  The C example.  It can probably be cut down to two lines
and "foo" vs. "bar" or whatever.

    (also possibly to the FAQ or Gotcha pages?).  What do you think?

You (or Paul, Jim, Bob, ...) would know better than me what deserves to
be on those pages (wherever they are).  My feeling would be yes.  Along
with mentioning --debug to, well, debug such things.

    How about "leading blanks are significant in sort key [...]" ?

I'm not sure what you mean by [...].  The %lu?
Are you proposing to just add the word "sort"?  That's not needed IMHO.

What I was thinking was something like this:
  sort: leading blanks are significant in key 1 [-k 2]; consider also specifying 'b'

Since this is debugging output, the more information the better, in
theory, seems to me.  Maybe it is not feasible.  No biggie.

    (in http://lingrok.org/xref/coreutils/src/sort.c#2439 )

I don't see the change.  Sorry.  --thanks, karl.