coreutils
[Top][All Lists]
Advanced

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

sort and collation


From: Magnus Fromreide
Subject: sort and collation
Date: Tue, 26 Nov 2024 05:31:07 +0100

Hello!

I tried to sort a file containing the lines
[X].Y
[X].W
[XZ]
[XX]
and got confused when sort returned
[X].W
[XX]
[X].Y
[XZ]
rather than
[XX]
[XZ]
[X].W
[X].Y
where the [X] values where kept together.

It seems that the problem is that my locale (en_US.utf8) specifies that
punctuation, like [, ], and ., is insignificant.

This is actually very close to what the -d flag to sort does but in my case
it is just confusing.

* Would it be possible to have a flag that tells sort to treat all input
  characters as unique entities and just compare their values?

* Would it be possible to combine that flag with the ignore case flag or
  does input characters where case transformation adds multiple characters
  kill that idea?

* Would it be possible to have a flag that tells sort to just perform an
  octet comparision, similar to 'LC_ALL=C sort' but slightly more ergonomic?

/MF



reply via email to

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