From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1BC283858CDA; Tue, 2 Jan 2024 13:28:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1BC283858CDA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1704202106; bh=yYNJLlvk7o50sMwYisgr1T/fzwqgsNkq/xA1W42/AUI=; h=From:To:Subject:Date:From; b=iqj0P+HhYiNsjS+w7+MTPiA+RK/wzyinM0rAaDGt/Xi2YANu8kMqWOCYKG82nXLFt b1Zih8bIdc+uTlxproisj/1LaeEwF3uSrel5qvLyniWJE47DZGW+Cq9bYHPQnIM93E t5JFMaBl7wsjtnVdYC/DsiM9xKe0l9VZqK1Ri04Y= From: "oscar.gustafsson at gmail dot com" To: libc-locales@sourceware.org Subject: [Bug localedata/31205] New: Inconsistent (mon_)grouping formats Date: Tue, 02 Jan 2024 13:28:25 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: localedata X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: oscar.gustafsson at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31205 Bug ID: 31205 Summary: Inconsistent (mon_)grouping formats Product: glibc Version: unspecified Status: UNCONFIRMED Severity: normal Priority: P2 Component: localedata Assignee: unassigned at sourceware dot org Reporter: oscar.gustafsson at gmail dot com CC: libc-locales at sourceware dot org Target Milestone: --- I was trying to look into using number grouping for a project and realized = that the formats used is not consistent. For reference, here is the documentatio= n: https://sourceware.org/glibc/manual/html_node/General-Numeric.html These are the two issues I've found: * Many locales have the same digit repeated, e.g., en_US https://sourceware.org/git/?p=3Dglibc.git;a=3Dblob;f=3Dlocaledata/locales/e= n_US;h=3D5cc518dff2fc1309e5cddd86950d6e9898a2d7e1;hb=3Drefs/heads/master#l75 As far as I can tell, it should be enough to have a single 3 there. As is t= he case for, e.g., en_HK https://sourceware.org/git/?p=3Dglibc.git;a=3Dblob;f=3Dlocaledata/locales/e= n_HK;h=3D5f797e076099c4972d3c74fe92e5a6607c3bae95;hb=3Drefs/heads/master#l84 * Some locales have 0;0 as grouping, e.g. el_GR https://sourceware.org/git/?p=3Dglibc.git;a=3Dblob;f=3Dlocaledata/locales/e= l_GR;h=3D285e1e009276476f2aa2d2745177944c7b34a78b;hb=3DHEAD Not sure what this is supposed to mean, but, e.g,. POSIX have -1 to indicate "no grouping"=20 https://sourceware.org/git/?p=3Dglibc.git;a=3Dblob;f=3Dlocaledata/locales/P= OSIX;h=3D7ec7f1c5774ab1fb011c08e2e17d435923e48fe2;hb=3Drefs/heads/master#l2= 62=20 Note that "The last member is either 0, in which case the previous member is used over and over again for all the remaining groups...", i.e., string termination, but here there will be a string with three string termination characters, to no previous member. To some extent this is also the case for mon_grouping, at least the first c= ase. I guess the impact of this issue depends on the situation. The first one wi= ll just waste a few bytes (and lead to confusion), but the second may lead to weird results, at least in code using the raw localedata information without noticing this. If people agree that this should be consistent and fixed (not so obvious wh= at to replace 0;0 with, probably -1?), I'd be happy to provide a patch. (Even = more happy to be able to do that using standard git-access, I can provide some credentials that I know how to use it etc.) --=20 You are receiving this mail because: You are on the CC list for the bug.=