This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] nl_NL locale: Correct the negative monetary format (bug 24614).
- From: Rafal Luzynski <digitalfreak at lingonborough dot com>
- To: libc-alpha at sourceware dot org
- Date: Thu, 6 Jun 2019 01:08:01 +0200 (CEST)
- Subject: [PATCH] nl_NL locale: Correct the negative monetary format (bug 24614).
Since the patch touches a test case in stdlib I'd like to get
at least one OK from the senior maintainers.
Links:
https://sourceware.org/bugzilla/show_bug.cgi?id=24614
https://st.unicode.org/cldr-apps/v#/nl/Number_Formatting_Patterns/
Regards,
Rafal
-- >8 --
According to CLDR 35.1 and the bug report the correct monetary format
for negative amounts should be "EUR -1 234,56" while previously it was
"EUR 1 234,56-".
This patch does not change the thousands (grouping) separator.
[BZ #24614]
* localedata/locales/nl_NL (n_sep_by_space): Set to 2 (a space
between the currency symbol and the minus sign).
(n_sign_posn): Set to 4 (the minus sign after the currency symbol).
* stdlib/Makefile (LOCALES): Append nl_NL.UTF-8.
* stdlib/tst-strfmon_l.c (tests): Add test data for nl_NL.UTF-8.
---
localedata/locales/nl_NL | 4 ++--
stdlib/Makefile | 2 +-
stdlib/tst-strfmon_l.c | 13 +++++++++++++
3 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/localedata/locales/nl_NL b/localedata/locales/nl_NL
index 1ab3277aa0..d0ba6c7283 100644
--- a/localedata/locales/nl_NL
+++ b/localedata/locales/nl_NL
@@ -83,9 +83,9 @@ frac_digits 2
p_cs_precedes 1
p_sep_by_space 1
n_cs_precedes 1
-n_sep_by_space 1
+n_sep_by_space 2
p_sign_posn 1
-n_sign_posn 2
+n_sign_posn 4
END LC_MONETARY
LC_NUMERIC
diff --git a/stdlib/Makefile b/stdlib/Makefile
index 32f6050ecc..8521e68107 100644
--- a/stdlib/Makefile
+++ b/stdlib/Makefile
@@ -171,7 +171,7 @@ include ../Rules
ifeq ($(run-built-tests),yes)
LOCALES := cs_CZ.UTF-8 de_DE.UTF-8 en_US.ISO-8859-1 tr_TR.UTF-8 \
tr_TR.ISO-8859-9 tg_TJ.UTF-8 hr_HR.UTF-8 hi_IN.UTF-8 \
- el_GR.UTF-8
+ el_GR.UTF-8 nl_NL.UTF-8
include ../gen-locales.mk
$(objpfx)bug-strtod2.out: $(gen-locales)
diff --git a/stdlib/tst-strfmon_l.c b/stdlib/tst-strfmon_l.c
index a193ed6787..7f0f6d47d5 100644
--- a/stdlib/tst-strfmon_l.c
+++ b/stdlib/tst-strfmon_l.c
@@ -216,6 +216,19 @@ static const struct locale_pair tests[] =
}
}
},
+ {
+ "nl_NL.UTF-8",
+ {
+ {
+ "EUR 1\u202f234\u202f567,89", "\u20ac 1\u202f234\u202f567,89",
+ "EUR 1234567,89", "\u20ac 1234567,89"
+ },
+ {
+ "EUR -1\u202f234\u202f567,89", "\u20ac -1\u202f234\u202f567,89",
+ "EUR -1234567,89", "\u20ac -1234567,89",
+ }
+ }
+ },
{}
};
--
2.21.0