public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Carlos O'Donell <carlos@redhat.com>
To: libc-alpha@sourceware.org, dj@redhat.com
Subject: [PATCH v2 0/2] Improve LC_MONETARY handling.
Date: Thu, 24 Feb 2022 16:45:45 -0500	[thread overview]
Message-ID: <20220224214547.911386-1-carlos@redhat.com> (raw)

In glibc 2.35 we released C.UTF-8, but if you try to compile
the locale without '-c' you get the following error:

localedef -i C -f UTF-8 C.UTF-8
[error] LC_MONETARY: value for field `mon_decimal_point' 
        must not be an empty string
[error] no output file produced because errors were issued

The first patch in the series fixes bug 28845 and cleans up
LC_MONETARY handling in ld-monetary.c (monetary_finish) 
for default values and generated errors. In general we 
downgrade the errors and make them warnings.

Lastly, to prevent this from happening again we remove the
'-c' from glibc localedef uses since we do not want to force
output generation and we should always have locales that
compile cleanly.

Where locales are not clean we should implement specific
warning disabling e.g. --no-warnings=ascii for SHIFT_JIS
and SHIFT_JISX0213 (non-ascii locales). Any future locale
warnings should fail during locale compilation (install
or testing).

Changes from v1:
  - Fix spelling mistakes in ld-monetary.c
  - Expand comments for mon_grouping to explain "\177" oddity.
  - Keep @flags="" in Makefile for future debugging uses.

Carlos O'Donell (2):
  localedef: Update LC_MONETARY handling (Bug 28845)
  localedata: Do not generate output if warnings were present.

 locale/programs/ld-monetary.c | 182 +++++++++++++++++++++++++++-------
 localedata/Makefile           |   3 +-
 localedata/gen-locale.sh      |  10 +-
 3 files changed, 155 insertions(+), 40 deletions(-)

-- 
2.34.1


             reply	other threads:[~2022-02-24 21:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-24 21:45 Carlos O'Donell [this message]
2022-02-24 21:45 ` [PATCH v2 1/2] localedef: Update LC_MONETARY handling (Bug 28845) Carlos O'Donell
2022-02-25  5:54   ` DJ Delorie
2022-02-25 15:27     ` Carlos O'Donell
2022-02-24 21:45 ` [PATCH v2 2/2] localedata: Do not generate output if warnings were present Carlos O'Donell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220224214547.911386-1-carlos@redhat.com \
    --to=carlos@redhat.com \
    --cc=dj@redhat.com \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).