bug-textutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fileutils/textutils LC_COLLATE support


From: Paul Eggert
Subject: Re: fileutils/textutils LC_COLLATE support
Date: Fri, 19 Oct 2001 03:53:44 -0700 (PDT)

> Date: Fri, 19 Oct 2001 11:08:01 +0100 (BST)
> From: Corin Hartland-Swann <address@hidden>

> But what do you get for:
> 
> $ (echo a; echo B) | sort -u

On Solaris 8 with LC_ALL=en_US.UTF-8, I get:

a
B

with both Solaris sort and with GNU textutils sort.

> Would you still expect all the uppercase letters to come first by default?

In that locale, I expect the order of ASCII letters to be a, A, b, B,
...  I also expect all the accented a's to be next to each other.  For
many applications, It's a more natural order than the C-locale order.

> However, can I persuade you to add a --binary option (or similar) to force
> straight byte-order sorting? This would allow users to keep the default
> locale definition for collation (so that things were displayed in the 
> correct order in lists), but to force sort(1) not to use it.

Why not just use "LC_ALL=C sort", if you want a C-locale sort?  That's
just as easy to use as "sort --by-byte" or whatever; and it's portable
to all POSIX implementations, as opposed to being GNU-specific.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]