H.-Dirk Schmitt wrote:
> O.k. I understand that it is working as defined in the 19th century.
> So it is maybe not a bug but still a weird behaviour.
> 
> In my case it takes several hour to find out why I don't get rid of 
> ~ 2.000 false entries in a blocklist for squid.
> 
> Reason for the lost time and this bug report is the bad/missing
> documentation. → That is a real bug!

We sympathize.  Really!  We have all been there ourselves.  But this
is really upstream in glibc not sort.  The place to complain for a fix
is there.

  https://www.gnu.org/software/libc/manual/html_node/Choosing-Locale.html

And also that this is an old problem.  It has gone this way for a
decade at least.  After so long of a time behavior becomes entrenched.

> At least the `LC_COLLATE` should be mentioned in the man-page and via 
> `--help`.

It is.  The man page says this:

  man sort

       *** 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.

Also note that this affects the way everything collates characters.
For example the shell with file globs also use the setting.  This can
be surprising.

Bob

Attachment: signature.asc
Description: PGP signature

Reply via email to