From patchwork Tue Nov 28 16:44:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mike FABIAN X-Patchwork-Id: 842230 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-87602-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="IVRolwnH"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3ymTzc4Tybz9t2Z for ; Wed, 29 Nov 2017 03:45:00 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id :mime-version:content-type; q=dns; s=default; b=Iqc/TL49c/Yq6LGi ScvjkkTa5iAlhGn39xtzkXfIx5Jqfxk8A9H4FO9bSMIFs+QcGn49xtdGqgJHc/4H 9iLn7JyoOjIuwLO/GC7Obj5UozuBR0EVAtywcxqvzA9rr2d7loUQaX1nejyHJ1e1 6vWe4I8cD6qQYaBeWTp9y04i58k= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id :mime-version:content-type; s=default; bh=u6gz9fKdLYeu5MIH1yT5xM ub5C0=; b=IVRolwnHiJM1A6J1XX/chYp1Lw4kvbFwO6sA+1PqaPQLr7BRUmtshN QlmJlX/+S4Sky23LQmNot5gztx2i5x5sXzqVQuqkEjg4eRgupgOmsgUFYai5crIj A3ANKpbn/hXpu+robTVB92nMs0N/oXDnwy8ovzXLXRkZWVO1ZSgck= Received: (qmail 24159 invoked by alias); 28 Nov 2017 16:44:54 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 24148 invoked by uid 89); 28 Nov 2017 16:44:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.7 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KB_WAM_FROM_NAME_SINGLEWORD, SPF_HELO_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=notre, le, 8:os, lve X-HELO: mx1.redhat.com From: Mike FABIAN To: GNU C Library Cc: Alexandre Oliva Subject: [PATCH] Collation fix: make forward accent sorting the default [BZ #17750] Date: Tue, 28 Nov 2017 17:44:48 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Updated version of Alexandre Oliva’s patch to make forward accent sorting the default. 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" From ecfefc6000d2bec29bb3f61f2963b6d186c06aba Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Tue, 28 Nov 2017 16:23:02 +0100 Subject: [PATCH] Collation fix: make forward accent sorting the default [BZ #17750] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [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" Reviewed-by: Mike FABIAN --- ChangeLog | 17 +++++++ localedata/Makefile | 4 +- localedata/fr_CA.UTF-8.in | 96 +++++++++++++++++++++++++++++++++++ localedata/fr_FR.UTF-8.in | 22 ++++---- localedata/locales/cs_CZ | 2 - localedata/locales/de_DE | 2 - localedata/locales/fr_CA | 2 + localedata/locales/hu_HU | 1 - localedata/locales/iso14651_t1_common | 6 +-- localedata/locales/lb_LU | 2 - localedata/locales/yuw_PG | 1 - 11 files changed, 131 insertions(+), 24 deletions(-) create mode 100644 localedata/fr_CA.UTF-8.in diff --git a/ChangeLog b/ChangeLog index 9307f40fae..87d7874013 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +2017-11-28 Alexandre Oliva + + [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-28 Mike FABIAN [BZ #22336] diff --git a/localedata/Makefile b/localedata/Makefile index b9f77d6c29..f8ca4041be 100644 --- a/localedata/Makefile +++ b/localedata/Makefile @@ -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 index 0000000000..1c05d69f5a --- /dev/null +++ b/localedata/fr_CA.UTF-8.in @@ -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 diff --git a/localedata/fr_FR.UTF-8.in b/localedata/fr_FR.UTF-8.in index dd5c5330d5..070eb4dc0d 100644 --- a/localedata/fr_FR.UTF-8.in +++ b/localedata/fr_FR.UTF-8.in @@ -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 diff --git a/localedata/locales/cs_CZ b/localedata/locales/cs_CZ index 163a40daec..f80d3e1b37 100644 --- a/localedata/locales/cs_CZ +++ b/localedata/locales/cs_CZ @@ -140,8 +140,6 @@ END LC_IDENTIFICATION LC_COLLATE -define DIACRIT_FORWARD - copy "iso14651_t1" collating-symbol diff --git a/localedata/locales/de_DE b/localedata/locales/de_DE index dd1c1cfa48..eaa9f7ff8e 100644 --- a/localedata/locales/de_DE +++ b/localedata/locales/de_DE @@ -84,8 +84,6 @@ END LC_CTYPE LC_COLLATE -define DIACRIT_FORWARD - % Copy the template from ISO/IEC 14651 copy "iso14651_t1" diff --git a/localedata/locales/fr_CA b/localedata/locales/fr_CA index 15401de337..e37d04226c 100644 --- a/localedata/locales/fr_CA +++ b/localedata/locales/fr_CA @@ -54,6 +54,8 @@ copy "fr_FR" END LC_CTYPE LC_COLLATE +define DIACRIT_BACKWARD + copy "en_CA" END LC_COLLATE diff --git a/localedata/locales/hu_HU b/localedata/locales/hu_HU index b860672748..01e45b958e 100644 --- a/localedata/locales/hu_HU +++ b/localedata/locales/hu_HU @@ -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 diff --git a/localedata/locales/iso14651_t1_common b/localedata/locales/iso14651_t1_common index 0e64f26a12..eb0fe9ec9d 100644 --- a/localedata/locales/iso14651_t1_common +++ b/localedata/locales/iso14651_t1_common @@ -5079,10 +5079,10 @@ order_start ;forward;backward;forward;forward,position IGNORE;IGNORE;IGNORE; IGNORE;IGNORE;IGNORE; -ifdef DIACRIT_FORWARD -order_start ;forward;forward;forward;forward,position -else +ifdef DIACRIT_BACKWARD order_start ;forward;backward;forward;forward,position +else +order_start ;forward;forward;forward;forward,position endif # ;;;IGNORE # 170 diff --git a/localedata/locales/lb_LU b/localedata/locales/lb_LU index f8da9447ea..92f1e22e1a 100644 --- a/localedata/locales/lb_LU +++ b/localedata/locales/lb_LU @@ -83,8 +83,6 @@ END LC_CTYPE LC_COLLATE -define DIACRIT_FORWARD - % Copy the template from ISO/IEC 14651 copy "iso14651_t1" diff --git a/localedata/locales/yuw_PG b/localedata/locales/yuw_PG index f9341facdc..0cb3cadf4a 100644 --- a/localedata/locales/yuw_PG +++ b/localedata/locales/yuw_PG @@ -45,7 +45,6 @@ translit_end END LC_CTYPE LC_COLLATE -define DIACRIT_FORWARD copy "iso14651_t1" END LC_COLLATE -- 2.14.3