Subject: coreutils: /usr/bin/sort bad sort order when using locale fr_FR.UTF-8

From: Xavier Combelle <[email-masked]>
Date: Sun, 08 May 2016 12:03:27 +0200

Package: coreutils
Version: 8.23-4
Severity: normal

Dear Maintainer,

I have a file test.txt containing two lines
Adrianne Allen
Adrian Pang

when using the following command line
env LC_ALL=fr_FR.UTF-8 /usr/bin/sort test.txt
it gives me the following result
Adrianne Allen
Adrian Pang

the expected result is
Adrian Pang
Adrianne Allen

I tryied with other locale, for example using the following command line
env LC_ALL=fr_FR.latin-1 /usr/bin/sort test.txt
and it gives me the expected result.

I asked on #debian and someone says that  could be related to
unicode spec.
However by using this site
http://demo.icu-project.org/icu-bin/locexp?_=fr_FR&d_=en&x=col
referenced by this page
https://en.wikipedia.org/wiki/Unicode_collation_algorithm
it gives me exactly the expected result.

Moreover, the expected result is what I learn in french school.
(as a native french speaker from france)

-- System Information:
Debian Release: 8.4
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.16.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages coreutils depends on:
ii  libacl1      2.2.52-2
ii  libattr1     1:2.4.47-2
ii  libc6        2.19-18+deb8u4
ii  libselinux1  2.3-2

coreutils recommends no packages.

coreutils suggests no packages.

-- no debconf information