From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS3215 2.6.0.0/16 X-Spam-Status: No, score=-4.3 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 76A241F8C6 for ; Mon, 6 Sep 2021 06:45:13 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 125B63858402 for ; Mon, 6 Sep 2021 06:45:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 125B63858402 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1630910712; bh=D0MD2iJG52hLdNOUWZOlCXHmbKRfIJnj+yb7ue3G9VE=; h=To:Subject:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=Y9apPBada2nqgwahjCezWu5MeGaelLnx+YhYXcBgdZjNhM672tYQN+7nmb9Vwcuug 90WKMMS0NJGqDZiUDtzNEgkChYnFxWavPwMxxcWjHWs9O0cnkKc26Oi39QMq4zgg+v sBsFLn6PtN42YPSqwySPLYM2KQjDgW4RgizjDRDw= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id 7920C3858C27 for ; Mon, 6 Sep 2021 06:44:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7920C3858C27 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-255-aK6F5Y4dPtaTxzB_pQ91Ig-1; Mon, 06 Sep 2021 02:44:50 -0400 X-MC-Unique: aK6F5Y4dPtaTxzB_pQ91Ig-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E033F80196C for ; Mon, 6 Sep 2021 06:44:49 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.194.140]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 467055D9CA; Mon, 6 Sep 2021 06:44:45 +0000 (UTC) To: Carlos O'Donell Subject: Re: [PATCH v10 2/2] Add generic C.UTF-8 locale (Bug 17318) References: <20210906041557.2470672-1-carlos@redhat.com> <20210906041557.2470672-3-carlos@redhat.com> Date: Mon, 06 Sep 2021 08:44:43 +0200 In-Reply-To: <20210906041557.2470672-3-carlos@redhat.com> (Carlos O'Donell's message of "Mon, 6 Sep 2021 00:15:57 -0400") Message-ID: <87eea22of8.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Florian Weimer via Libc-alpha Reply-To: Florian Weimer Cc: libc-alpha@sourceware.org Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org Sender: "Libc-alpha" * Carlos O'Donell: > +* Support for the C.UTF-8 locale has been added to glibc. The locale > + supports full code-point sorting for all valid Unicode code points. A > + limitation in the framework for fnmatch, regexec, and regcomp requires > + a compromise to save space and only ASCII-based range expressions are > + supported for now (see bug 28255). The full size of the locale is > + only ~400KiB, with 346KiB coming from LC_CTYPE information for > + Unicode. This locale harmonizes downstream C.UTF-8 already shipping in > + various downstream distributions. The locale is not built into glibc, > + and must be installed. Missing space after =E2=80=9CUnicode.=E2=80=9D (two spaces expected). > diff --git a/posix/tst-regex.c b/posix/tst-regex.c > index e7c2b05e86..4be5d173eb 100644 > --- a/posix/tst-regex.c > +++ b/posix/tst-regex.c > @@ -150,9 +151,23 @@ test_expr (const char *expr, int expected, int expec= tedicase) > size_t outlen; > char *uexpr; > =20 > - /* First test: search with an UTF-8 locale. */ > - if (setlocale (LC_ALL, "de_DE.UTF-8") =3D=3D NULL) > - error (EXIT_FAILURE, 0, "cannot set locale de_DE.UTF-8"); > + /* First test: search with basic C.UTF-8 locale. */ > + printf ("INFO: Testing C.UTF-8.\n"); > + xsetlocale (LC_ALL, "C.UTF-8"); > + > + printf ("\nTest \"%s\" with multi-byte locale\n", expr); > + result =3D run_test (expr, mem, memlen, 0, expected); > + printf ("\nTest \"%s\" with multi-byte locale, case insensitive\n", ex= pr); > + result |=3D run_test (expr, mem, memlen, 1, expectedicase); > + printf ("\nTest \"%s\" backwards with multi-byte locale\n", expr); > + result |=3D run_test_backwards (expr, mem, memlen, 0, expected); > + printf ("\nTest \"%s\" backwards with multi-byte locale, case insensit= ive\n", > +=09 expr); > + result |=3D run_test_backwards (expr, mem, memlen, 1, expectedicase); > + > + /* Second test: search with an UTF-8 locale. */ > + printf ("INFO: Testing de_DE.UTF-8.\n"); > + xsetlocale (LC_ALL, "de_DE.UTF-8"); > =20 > printf ("\nTest \"%s\" with multi-byte locale\n", expr); > result =3D run_test (expr, mem, memlen, 0, expected); This is another (or the same?) overwrite of the result variable. Thanks, Florian