Sujet : Re: Sorting problem with Unix sort(1) with UTF-8 punctuation characters - locale issue
De : janis_papanagnou+ng (at) *nospam* hotmail.com (Janis Papanagnou)
Groupes : comp.unix.shellDate : 20. Feb 2025, 02:04:42
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vp5v3a$2h7ig$1@dont-email.me>
References : 1 2
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
On 19.02.2025 23:35, Dan Cross wrote:
In article <vp4f6o$288ui$1@dont-email.me>,
Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote:
I've been sorting punctuation characters on one Unix system and it
did not produce the expected result. Switching to another system did
it as expected.
>
The test program (it contains non-ASCII middle-dot characters) was
>
sort -t $'\t' <<EOT
Do you really have the '$' there?
Yes, I have the habit of using Kornshell's "ANSI C String" feature
wherever control characters are to be placed in shell code.[*]
Here it's actually an unnecessary remains of the tests I had made
with tries of 'sort -k1' (to be sure that 'sort' will operate on
the (first) punctuation field and not on the (second) text items).
(I should have removed it for posting purposes to not confuse the
matter for the readers.)
Janis
[*] They make the intention of code visible and as opposed to using
literal TABs safer. For posting it's also advantageous since it
allows to copy paste samples without wondering what the whitespace
actually is or to fear whether the client software "intelligently"
changes the format.