bug-coreutils
[Top][All Lists]
Advanced

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

Re: Collating order


From: James Youngman
Subject: Re: Collating order
Date: Tue, 5 Apr 2005 17:03:44 +0100
User-agent: Mutt/1.3.28i

On Tue, Apr 05, 2005 at 12:11:28PM +0200, Ole Laursen wrote:
>   ~/t$ LANG=en_US ls -1
>   event.C
>   eventgenerator.C
>   eventgenerator.h
>   event.h

In other words, these sort as if they were 

eventc
eventgeneratorc
eventgeneratorh
eventh

> I guess the problem is that the dot has a different meaning in the
> context of file names so "ls" should try to do something clever like
> splitting the extension from the basename and sort the basenames
> first.

I'm not sure I agree.  Dot isn't really special, it's just a common
convention.  The only characters that I think should really be special
are '/' and '\0'.  If one special-cases '.' I think it could well be
hard to justify not special-casing '-', '_' and '~'.  Just imagine how
complicated it would then be to document all those rules.

One would also need to turn off all this special casing for
LC_COLLATE=C or (perhaps) for locales which don't feature multilevel
sorting.  Mind you, I have just read
http://www.unicode.org/reports/tr10/#Multi_Level_Comparison, which
makes me rather keen to steer clear of any consideratins relating to
multi-level sorting...

James.





reply via email to

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