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

Re: Locales/sort bug



On Fri, 05 Nov 2010 00:36:47 +0100, David Jardine wrote:

> On Thu, Nov 04, 2010 at 10:55:53PM +0000, Camaleón wrote:

(...)

>> Heck, it's even weirder with this sequence:
>> 
>> aph3,"z
>> aph3_devel,"a
>> aph3,"b
>> 
>> I gets sorted as:
>> 
>> aph3,"b
>> aph3_devel,"a
>> aph3,"z
>> 
>> I'm trying to "reverse-engineering" the logic behind the sort but I
>> can't see it. Maybe it is done randomly? Very curious, indeed.
> 
> It just seems to ignore certain characters.  Try filtering the output
> through, for example, 's/[_|"|,]//g' and the you get it in the right
> order.

Yes, "sort" documentation and man page advice about that (to avoid custom 
locales while using it), but what (an how) it really does when locales 
are in use? Why ranking "comma" at the first place and then give 
"underscore" a higher priority? :-?

Greetings,

-- 
Camaleón


Reply to: