Subject: bug#42986: sort: possible bug when sorting special characters

From: "Wolter H. V." <[email-masked]>
Date: Sat, 22 Aug 2020 12:46:19 +0100

The following commands:

    echo 'Pará,9\nParacito,0' | sort --field-separator=, -k1

and

    echo 'Pará,Z\nParacito,A' | sort --field-separator=, -k1

give

    Pará,9
    Paracito,0

and

    Paracito,A
    Pará,Z

respectively.

Sorting the string 'á\na' results in 'a\ná', so I would expect the commands above to put Paracito before Pará, but this is not the case for the first command. Why is that?

Regards,

Wolter HV