[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: strcoll problem?
From: |
Hans-Bernhard Broeker |
Subject: |
Re: strcoll problem? |
Date: |
15 Mar 2002 16:34:08 GMT |
Paul E. Black <address@hidden> wrote:
> traced to strcoll: space is ordered in strange (to me) ways depending
> on the context. Here it is between "s" and "t":
You're misinterpreting how "sort" works, to some extent. It's not
space that is being sorted betwen 's' and 't', but rather capital 'S'.
sort treats whitespace as column separators, by default. I.e. your
input:
> $ more sortbug
> SP
> sBSP
> tBSP
is actually more like
SP
sBSP
tBSP
as far as SORT is concerned.
> Is this correct (or acceptable) behavior?
For some locales: yes.
> LC_ALL is not set. When I set it to "C", sort works as expected.
That's the telltale sign of l10n being the root of your problem. I
expect you'll find either LC_COLLATE or LANG set to some value
different from "C" and "POSIX".
--
Hans-Bernhard Broeker (address@hidden)
Even if all the snow were burnt, ashes would remain.
- strcoll problem?, Paul E. Black, 2002/03/14
- Re: strcoll problem?,
Hans-Bernhard Broeker <=