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.2 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,NICE_REPLY_A, RCVD_IN_DNSWL_MED,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 091D91F5AE for ; Thu, 29 Apr 2021 20:06:06 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5F81D39574CD; Thu, 29 Apr 2021 20:06:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5F81D39574CD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1619726764; bh=3QFlgDfMKEmrAYi2zSadPLuV/NdNzWqZoHw1umTyimk=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=gWOoEeOfH8xo2VIitvkpTtO7AHcWLqI/qJ9/wlbzR5j6DyLX8MVicfrmpLD482jsV sN/ME/4eYN7vswpq1r5xTZWDXOKTGeIBLOx/XJGtQ8Ex+zEdJTHHZnGiGSj1YRt6hH VBP0nztAXvMkdW7b5OQpofBhgU/d3IqO0T5CdPTs= 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 449DB385782C for ; Thu, 29 Apr 2021 20:06:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 449DB385782C Received: from mail-qv1-f71.google.com (mail-qv1-f71.google.com [209.85.219.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-73-dfBa3GQzNZWI0QWW7_LfdA-1; Thu, 29 Apr 2021 16:05:58 -0400 X-MC-Unique: dfBa3GQzNZWI0QWW7_LfdA-1 Received: by mail-qv1-f71.google.com with SMTP id c5-20020a0ca9c50000b02901aede9b5061so19299794qvb.14 for ; Thu, 29 Apr 2021 13:05:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=3QFlgDfMKEmrAYi2zSadPLuV/NdNzWqZoHw1umTyimk=; b=DBIoQSIBtMHtNHxGEoRPAyxnDVP04oKVr6hhU6XGu+/d4z8nIwb80VHm1WUex/6Md2 I9K0fLNyMR2pjUTBKUq4itBIB559zNOitPD4t71ns4ihLzwvlNIdIDWeaK9ONKdUZJHj 4+P5bBsUd+8NjGrXW+W42z5c81Jx/ajZEx9BjODyrbZtjxoGVK2j1UiiD7L9x4L53qQR HoOs95b63K+y5L1dwzH1lvfPoQ6mAS6OWqLPd/2CoHkT6Z5h2T8ol9In8AoEmAxcogBJ NUEawkI1O7f/qNTE9ksmT+oFaG9KkKZ2ylmnSxY0geDsm4dIyqh5AYN5z/Z2O1G5sfFa wZQw== X-Gm-Message-State: AOAM530Zu3/pahLQH1w0adpkI5/TGgOTPAkT+ptJYrVv5P09ObdWP8Wv s3Rx/GIZ9KQFAkg+BxB4pJBU9QSfhEOtHLzBoPmg4KgT97tRkhcDcGyDqZ6OJot1+NZIurIpwJC wBHbFWGslvJB67y+oDpmFsJnpz9o44q+MF0B/nFYzCG+8+EbzVxXqN1AgSzL6+plUSaaN1w== X-Received: by 2002:ac8:7409:: with SMTP id p9mr1172408qtq.208.1619726757754; Thu, 29 Apr 2021 13:05:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzib+qr/wJgidTZsKQnmzJ58jBlypmyHYukI5pPWg40tkyY4cdduAL0tavJjRAhimqYS98Low== X-Received: by 2002:ac8:7409:: with SMTP id p9mr1172384qtq.208.1619726757452; Thu, 29 Apr 2021 13:05:57 -0700 (PDT) Received: from [192.168.1.16] (198-84-214-74.cpe.teksavvy.com. [198.84.214.74]) by smtp.gmail.com with ESMTPSA id c23sm709055qtm.46.2021.04.29.13.05.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 29 Apr 2021 13:05:55 -0700 (PDT) Subject: Re: [PATCH v4 4/4] Add generic C.UTF-8 locale (Bug 17318) To: Florian Weimer References: <20210428130033.3196848-1-carlos@redhat.com> <20210428130033.3196848-5-carlos@redhat.com> <87eeetfaan.fsf@oldenburg.str.redhat.com> Organization: Red Hat Message-ID: <93ab3888-25db-4582-ce6a-c7a91ac14417@redhat.com> Date: Thu, 29 Apr 2021 16:05:54 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <87eeetfaan.fsf@oldenburg.str.redhat.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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: Carlos O'Donell via Libc-alpha Reply-To: Carlos O'Donell Cc: libc-alpha@sourceware.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" On 4/29/21 10:13 AM, Florian Weimer wrote: > * Carlos O'Donell: > >> We add a new C.UTF-8 locale. This locale is not builtin to glibc, but >> is provided as a distinct locale. The locale provides full support >> for UTF-8 and this includes full code point sorting via collation >> (excludes surrogates). Unfortuantely given the present implementation >> in glibc this results in 28MiB of LC_COLLATE data for all possible >> Unicode code points. Future improvements may reduce this size. Such >> improvements likely require a shortcut for the collation data that >> relies on C.UTF-8 single-byte sorting being equivalent to strcmp. >> >> The new locale is NOT added to SUPPORTED. Minimal test data for >> specific code points (minus those not supported by collate-test) is >> provided in C.UTF-8.in, and this verifies code point sorting is >> working reasonably across the range. >> >> The next step is to reduce LC_COLLATE to a manageable size before we >> enable the locale in SUPPORTED. Fully testing C.UTF-8 collation can >> add ~5-7 minutes to the locale testing (collate-test, and xfrm-test >> twice) so we don't enable full testing of all code points until we can >> parallelize the sort-test test. Testing sort-test with C.UTF-8 minimal >> test data passes cleanly. > > Can you compare this locale with what is in Fedora and Debian, for the > non-collaction/CTYPE aspects? Oh, doing this review in more detail for you found a potential defect. Thank you for encouraging a more detailed review. I see that C has the first work day as Monday, but in C.UTF-8 we have switched to Sunday, possibly by accident, and my initial review didn't catch this. I'll spin a v5 which is also going to be smaller after this patch: https://sourceware.org/pipermail/libc-alpha/2021-April/125595.html. Debian (sid, 2.31-11) vs Upstream: - LC_IDENTIFICATION, contains old date, maintainer @debian address etc. - No substantive differences. - LC_CTYPE, includes "translit_combining" which is wrong for a C locale IMO. - Upstream C.UTF-8 includes no transliteration, all characters pass through because UTF-8 supports all such characters. - LC_COLLATE, split ranges differently, *includes* surrogates, uses UNDEFINED correctly. - Upstream C.UTF-8 *excludes* surrogates, but otherwise covers same set. - LC_MONETARY, copy "POSIX" - Upstream C.UTF-8 explicitly defines fields, difference in 'negative_sign' where upstream will use "-" and POSIX uses "". This aligns with existing builtin C locale. - LC_NUMERIC, copy "POSIX" - Upstream C.UTF-8 explicitly defines fields, no difference from POSIX. - LC_TIME, first_workday is 2 (otherwise the same) - Upstream C.UTF-8 set first_workday to 1, this is a bug my patch. - LC_MESSAGES, only defines yesexpr and noexpr. - Upstream C.UTF-8 defines yesexpr, noexpr, yesstr and nostr. Superset of data. - LC_PAPER, copy "i18n" - Upstream C.UTF-8 explicitly defines fields, no differences. - LC_NAME, copy "i18n" - Upstream C.UTF-8 explicitly defines fields, no differences. - LC_ADDRESS, copy "i18n" - Upstream C.UTF-8 explicitly defines fields, no differences. - LC_TELEPHONE, defines tel_int_fmt. - Upstream C.UTF-8 explicitly defines tel_int_fmt, no differences. - LC_MEASUREMENT, copy "i18n" - Upstream C.UTF-8 explicitly defines measurement, no differences. > Are there other distributions which ship a downstream C.UTF-8 locale? Yes, Gentoo. I spoke to Andreas Huettel from the gentoo-toolchain team and they are using Mike Fabian's original C.UTF-8 which is harmonized and identical (including the first_workday bug) to what I'm proposing. I think it would be safe for Debian, Ubuntu, Gentoo, Fedora, CentOS Stream, and RHEL to switch to the new C.UTF-8 locale from upstream. -- Cheers, Carlos.