]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Collation fix: make forward accent sorting the default [BZ #17750]
authorAlexandre Oliva <aoliva@redhat.com>
Tue, 28 Nov 2017 15:23:02 +0000 (16:23 +0100)
committerMike FABIAN <mfabian@redhat.com>
Wed, 29 Nov 2017 10:56:46 +0000 (11:56 +0100)
[BZ #17750]
* Makefile: add fr_CA.UTF-8 to test-input and LOCALES.
* localedata/fr_CA.UTF-8.in: New file with test data for backward
accents sorting.
* localedata/fr_FR.UTF-8.in: Fix test data for forward accents
sorting.
* localedata/locales/cs_CZ (LC_COLLATE): Remove “define DIACRIT_FORWARD”
* localedata/locales/de_DE (LC_COLLATE): Likewise.
* localedata/locales/hu_HU (LC_COLLATE): Likewise.
* localedata/locales/lb_LU (LC_COLLATE): Likewise.
* localedata/locales/yuw_PG (LC_COLLATE): Likewise.
* localedata/locales/fr_CA (LC_COLLATE): Add “define DIACRIT_BACKWARD”
* localedata/locales/iso14651_t1_common: Use “ifdef DIACRIT_FORWARD”
instead of “ifdef DIACRIT_BACKWARD”.

The only locale which currently needs backward accents sorting is fr_CA.
Therefore, forward accents sorting should be the default.

Before this patch, backwards accent sorting was the default and all
locales except fr_CA had to use

    define DIACRIT_FORWARD

before

    copy "iso14651_t1"

Most locales didn’t do that and thus got the inappropriate backwards accents sorting
by accident. Now only the fr_CA locale needs to use

    define DIACRIT_BACKWARD

before

    copy "iso14651_t1"

Original patch slightly modified by: Mike FABIAN <mfabian@redhat.com>

ChangeLog
localedata/Makefile
localedata/fr_CA.UTF-8.in [new file with mode: 0644]
localedata/fr_FR.UTF-8.in
localedata/locales/cs_CZ
localedata/locales/de_DE
localedata/locales/fr_CA
localedata/locales/hu_HU
localedata/locales/iso14651_t1_common
localedata/locales/lb_LU
localedata/locales/yuw_PG

index 29bcf625892e1b4f00a8976020ff946dd207d2f1..a73e09fb2e4350469583d6d57a944c0fe203f25c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2017-11-28  Mike FABIAN  <mfabian@redhat.com>, Alexandre Oliva <aoliva@redhat.com>
+
+       [BZ #17750]
+       * Makefile: add fr_CA.UTF-8 to test-input and LOCALES.
+       * localedata/fr_CA.UTF-8.in: New file with test data for backward
+       accents sorting.
+       * localedata/fr_FR.UTF-8.in: Fix test data for forward accents
+       sorting.
+       * localedata/locales/cs_CZ (LC_COLLATE): Remove “define DIACRIT_FORWARD”
+       * localedata/locales/de_DE (LC_COLLATE): Likewise.
+       * localedata/locales/hu_HU (LC_COLLATE): Likewise.
+       * localedata/locales/lb_LU (LC_COLLATE): Likewise.
+       * localedata/locales/yuw_PG (LC_COLLATE): Likewise.
+       * localedata/locales/fr_CA (LC_COLLATE): Add “define DIACRIT_BACKWARD”
+       * localedata/locales/iso14651_t1_common: Use “ifdef DIACRIT_FORWARD”
+       instead of “ifdef DIACRIT_BACKWARD”.
+
 2017-11-29  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
 
        * config.h.in (HAVE_AS_VIS3_SUPPORT): Remove check for VIS3 support.
index b9f77d6c29b9135ad3bb259272311439f373a571..f8ca4041beea7a714a80905904827a8f8b1ea8fe 100644 (file)
@@ -38,7 +38,7 @@ test-srcs := collate-test xfrm-test tst-fmon tst-rpmatch tst-trans \
 test-input := de_DE.ISO-8859-1 en_US.ISO-8859-1 da_DK.ISO-8859-1 \
              hr_HR.ISO-8859-2 sv_SE.ISO-8859-1 tr_TR.UTF-8 fr_FR.UTF-8 \
              si_LK.UTF-8 uk_UA.UTF-8 hu_HU.UTF-8 lv_LV.UTF-8 \
-             pl_PL.UTF-8 cs_CZ.UTF-8
+             pl_PL.UTF-8 cs_CZ.UTF-8 fr_CA.UTF-8
 test-input-data = $(addsuffix .in, $(test-input))
 test-output := $(foreach s, .out .xout, \
                         $(addsuffix $s, $(basename $(test-input))))
@@ -108,7 +108,7 @@ LOCALES := de_DE.ISO-8859-1 de_DE.UTF-8 en_US.ANSI_X3.4-1968 \
           nb_NO.ISO-8859-1 nn_NO.ISO-8859-1 tr_TR.UTF-8 cs_CZ.UTF-8 \
           zh_TW.EUC-TW fa_IR.UTF-8 fr_FR.UTF-8 ja_JP.UTF-8 si_LK.UTF-8 \
           tr_TR.ISO-8859-9 en_GB.UTF-8 uk_UA.UTF-8 hu_HU.UTF-8 lv_LV.UTF-8 \
-          pl_PL.UTF-8
+          pl_PL.UTF-8 fr_CA.UTF-8
 include ../gen-locales.mk
 endif
 
diff --git a/localedata/fr_CA.UTF-8.in b/localedata/fr_CA.UTF-8.in
new file mode 100644 (file)
index 0000000..1c05d69
--- /dev/null
@@ -0,0 +1,96 @@
+@@@@@
+0000
+9999
+Aalborg
+aide
+aïeul
+air
+@@@air
+air@@@
+Ålborg
+août
+bohème
+Bohême
+Bohémien
+caennais
+cæsium
+çà et là
+C.A.F.
+Canon
+cañon
+casanier
+cølibat
+colon
+côlon
+COOP
+CO-OP
+coop
+co-op
+Copenhagen
+COTE
+cote
+CÔTE
+côte
+COTÉ
+coté
+CÔTÉ
+côté
+du
+dû
+élève
+élevé
+gène
+gêne
+gêné
+Größe
+Grossist
+haie
+haïe
+île
+Île d'Orléans
+lame
+l'âme
+lamé
+les
+LÈS
+lèse
+lésé
+L'Haÿ-les-Roses
+MÂCON
+maçon
+McArthur
+Mc Arthur
+Mc Mahon
+MODÈLE
+modelé
+NOËL
+Noël
+notre
+nôtre
+ode
+œil
+ou
+OÙ
+ovoïde
+pèche
+pêche
+PÉCHÉ
+péché
+pêché
+pécher
+pêcher
+pechère
+péchère
+relève
+relevé
+resume
+resumé
+résumé
+révèle
+révélé
+vice-president
+vice-président
+vice-president's offices
+vice-presidents' offices
+VICE-VERSA
+vice versa
index dd5c5330d5c3f95d699f265313468b3f8042fb9e..070eb4dc0dce815cdc41a73d1a572e64258528a0 100644 (file)
@@ -29,16 +29,16 @@ CO-OP
 Copenhagen
 cote
 COTE
-côte
-CÔTE
 coté
 COTÉ
+côte
+CÔTE
 côté
 CÔTÉ
 du
 dû
-élève
 élevé
+élève
 gène
 gêne
 gêné
@@ -49,20 +49,20 @@ haïe
 île
 Île d'Orléans
 lame
-l'âme
 lamé
+l'âme
 les
 LÈS
-lèse
 lésé
+lèse
 L'Haÿ-les-Roses
-MÂCON
 maçon
+MÂCON
 McArthur
 Mc Arthur
 Mc Mahon
-MODÈLE
 modelé
+MODÈLE
 Noël
 NOËL
 notre
@@ -72,22 +72,22 @@ ode
 ou
 OÙ
 ovoïde
-pèche
-pêche
 péché
 PÉCHÉ
+pèche
+pêche
 pêché
 pécher
 pêcher
 pechère
 péchère
-relève
 relevé
+relève
 resume
 resumé
 résumé
-révèle
 révélé
+révèle
 vice-president
 vice-président
 vice-president's offices
index 163a40daec207702ee20be6d712ef3ecac4e171a..f80d3e1b37f72a5b39bae627b34d01fa64e0fc0f 100644 (file)
@@ -140,8 +140,6 @@ END LC_IDENTIFICATION
 
 LC_COLLATE
 
-define DIACRIT_FORWARD
-
 copy "iso14651_t1"
 
 collating-symbol <c-caron>
index dd1c1cfa48f594e3f8c27d2843833e17315dc74b..eaa9f7ff8e47c8024c2466d3dc40c4696e2ca0af 100644 (file)
@@ -84,8 +84,6 @@ END LC_CTYPE
 
 LC_COLLATE
 
-define DIACRIT_FORWARD
-
 % Copy the template from ISO/IEC 14651
 copy "iso14651_t1"
 
index 15401de337785f79c51b910bb6426a694e0e3796..e37d04226ce7952341fb83e32edd06b0445d04e8 100644 (file)
@@ -54,6 +54,8 @@ copy "fr_FR"
 END LC_CTYPE
 
 LC_COLLATE
+define DIACRIT_BACKWARD
+
 copy "en_CA"
 END LC_COLLATE
 
index b8606727481cecfc62b10292d78a28ad14de0df9..01e45b958e24f137863f1b48db7347f60db79d69 100644 (file)
@@ -63,7 +63,6 @@ category "i18n:2012";LC_MEASUREMENT
 END LC_IDENTIFICATION
 
 LC_COLLATE
-define DIACRIT_FORWARD
 copy "iso14651_t1"
 
 %% a b c cs d dz dzs e f g gy h i j k l ly m n ny o o: p q
index 0e64f26a125d63e84e59650806fa2ac59bce0a01..eb0fe9ec9d813cbbff78c1ea66b8271f2b018b99 100644 (file)
@@ -5079,10 +5079,10 @@ order_start <SPECIAL>;forward;backward;forward;forward,position
 <U009E> IGNORE;IGNORE;IGNORE;<U009E>
 <U009F> IGNORE;IGNORE;IGNORE;<U009F>
 
-ifdef DIACRIT_FORWARD
-order_start <LATIN>;forward;forward;forward;forward,position
-else
+ifdef DIACRIT_BACKWARD
 order_start <LATIN>;forward;backward;forward;forward,position
+else
+order_start <LATIN>;forward;forward;forward;forward,position
 endif
 #
 <U00A0> <U0020>;<BAS>;<MIN>;IGNORE # 170<NBSP>
index f8da9447ea73e3f03ce57993ad93bee77de2a751..92f1e22e1afa8301f7c47f6f02c1e7e08dba0147 100644 (file)
@@ -83,8 +83,6 @@ END LC_CTYPE
 
 LC_COLLATE
 
-define DIACRIT_FORWARD
-
 % Copy the template from ISO/IEC 14651
 copy "iso14651_t1"
 
index f9341facdcaa12c3409c9002687b17255729cfba..0cb3cadf4ae485a1d5551e9e73d3836923fde2ec 100644 (file)
@@ -45,7 +45,6 @@ translit_end
 END LC_CTYPE
 
 LC_COLLATE
-define DIACRIT_FORWARD
 copy "iso14651_t1"
 END LC_COLLATE