mbox

[0/2] Improve LC_MONETARY handling.

Message ID 20220205025700.3728228-1-carlos@redhat.com
Headers

Message

Carlos O'Donell Feb. 5, 2022, 2:56 a.m. UTC
  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).

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 | 172 +++++++++++++++++++++++++++-------
 localedata/Makefile           |   3 +-
 2 files changed, 137 insertions(+), 38 deletions(-)