Bug 24614

Summary: nl_NL LC_MONETARY doesn't match CLDR 35
Product: glibc Reporter: sjon
Component: localedataAssignee: Rafal Luzynski <digitalfreak>
Status: RESOLVED FIXED    
Severity: normal CC: digitalfreak, libc-locales, wesley
Priority: P2 Flags: fweimer: security-
Version: 2.29   
Target Milestone: 2.30   
Host: Target:
Build: Last reconfirmed: 2019-06-05 00:00:00

Description sjon 2019-05-23 15:03:48 UTC
This was originally reported as https://bugs.php.net/bug.php?id=78056

CLDR Version 27.0.1 defines "¤ -#,##0.00" as standard-currency formatting for nl_NL - however the current ./localedata/locales/nl_NL has n_sign_posn=2 which I think should be updated to n_sign_posn=4
Comment 1 Wesley 2019-05-23 15:45:21 UTC
*** Bug 24615 has been marked as a duplicate of this bug. ***
Comment 2 Rafal Luzynski 2019-05-24 22:47:33 UTC
Thank you for the report.  I am currently working on this bug.

Please explain, what is the current grouping (thousands) separator for nl_NL?  CLDR [1] says it is a single dot (".") and bug 23831 says the same which is consistent.  But the link you quoted [2] and bug 24615 say it should be space.  Also the current value of mon_thousands_sep (but not thousands_sep) is <U202F> (narrow no-break space).

I lean to assume that the correct value is a dot but the other bugs quote the space because they were about the minus sign position and ignored the thousands separator.

[1] http://st.unicode.org/cldr-apps/v#/nl/Symbols/
[2] https://bugs.php.net/bug.php?id=78056
Comment 3 Wesley 2019-05-25 05:23:19 UTC
Oh, I didn't see he specified nl_NL.
nl_BE should be like this: € -1 234,56

According to this guy: https://sourceware.org/bugzilla/show_bug.cgi?id=23831
nl_NL should be like this € -1.234,56

I'm from Belgium, not the Netherlands so I can't speak for them.
In Belgium, both are correct, but the space is specified in the ISO/BIN norms.
Comment 4 keld@keldix.com 2019-05-25 09:41:30 UTC
banks in continental Europe thed to use . as mon_thousands_sep while for
thousands_sep the customary separator  is some kind of space.
I am unhqppy about the space separator, as it makes it much harder to parse
and not my impression of the conventions in scientific computing.

keld


On Sat, May 25, 2019 at 05:23:19AM +0000, wesley at weha dot be wrote:
> https://sourceware.org/bugzilla/show_bug.cgi?id=24614
> 
> --- Comment #3 from Wesley <wesley at weha dot be> ---
> Oh, I didn't see he specified nl_NL.
> nl_BE should be like this: ??? -1 234,56
> 
> According to this guy: https://sourceware.org/bugzilla/show_bug.cgi?id=23831
> nl_NL should be like this ??? -1.234,56
> 
> I'm from Belgium, not the Netherlands so I can't speak for them.
> In Belgium, both are correct, but the space is specified in the ISO/BIN norms.
> 
> -- 
> You are receiving this mail because:
> You are on the CC list for the bug.
Comment 5 sjon 2019-05-25 09:54:16 UTC
Currently nl_BE is (as for LC_MONETARY) an alias for nl_NL which is correct IMO.

It seems there isn't a strict consensus as to what is correct for the thousand-separator - and I'd suggest keeping that discussion in #23831. 

Personally I agree with what's written in https://taaladvies.net/taal/advies/vraag/1/10000000_10_000_000/ - which basically says the space is ISO/BIN correct but the dot is more commonly used instead.
Comment 6 Wesley 2019-05-25 15:11:16 UTC
Like I said, both are technically correct.
I believe space is more commonly used, I never see dots as a separator.

I care less about the thousand separator and more about the negative sign.
Dots are easily removed, setting the negative sign after the euro and before the amount is harder.
Comment 7 Rafal Luzynski 2019-05-28 22:35:49 UTC
(In reply to sjon from comment #5)
> [...] and I'd suggest keeping that discussion in #23831. 

You are right.  Sorry for the noise.  I was thinking about fixing those two bugs with one commit.  I have no more questions about this particular issue so if I don't resolve missing questions about bug 23831 then I'll just push a solution for this one.
Comment 8 Rafal Luzynski 2019-06-05 23:22:49 UTC
1. The latest version of CLDR is 35.1 so I update the bug report summary to reflect this.  I have dropped ".1" because I don't want to be too nit-picky.  Otherwise everything is still correct in this bug report.

2. See the patch which should fix the problem: https://sourceware.org/ml/libc-alpha/2019-06/msg00089.html
Comment 9 Sourceware Commits 2019-06-17 21:44:26 UTC
The master branch has been updated by Rafal Luzynski <rl@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=02d8b5ab1c89bcef2627d2b621bfb35b573852c2

commit 02d8b5ab1c89bcef2627d2b621bfb35b573852c2
Author: Rafal Luzynski <digitalfreak@lingonborough.com>
Date:   Thu Jun 6 00:22:54 2019 +0200

    nl_NL locale: Correct the negative monetary format (bug 24614).
    
    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/Makefile (LOCALES): Add nl_NL.UTF-8.
    	* 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).
    	* localedata/tst-strfmon1.c (tests): Add test data for nl_NL.UTF-8.
Comment 10 Rafal Luzynski 2019-06-17 22:33:02 UTC
I don't yet close this bug report because this question has just come to my mind: shouldn't the same change be applied to nl_AW (Dutch for Aruba)?

Links:
* https://sourceware.org/git/?p=glibc.git;a=blob;f=localedata/locales/nl_AW;hb=HEAD
* https://st.unicode.org/cldr-apps/v#/nl_AW/Number_Formatting_Patterns/
Comment 11 Sourceware Commits 2019-06-19 21:46:50 UTC
The master branch has been updated by Rafal Luzynski <rl@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=f59a54ab0c2dcaf9ee946df2bfee9d4be81f09b8

commit f59a54ab0c2dcaf9ee946df2bfee9d4be81f09b8
Author: Rafal Luzynski <digitalfreak@lingonborough.com>
Date:   Tue Jun 18 01:20:11 2019 +0200

    nl_AW locale: Correct the negative monetary format (bug 24614).
    
    Follow the same changes as made in the commit 02d8b5ab1c because the
    respective entries in nl_NL and nl_AW had been the same before the change
    so they should be the same after.  CLDR does not provide complete data
    for nl_AW, it says it is missing and displays a copy of nl_NL.
    
    	[BZ #24614]
    	* localedata/locales/nl_AW (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).
Comment 12 Rafal Luzynski 2019-06-19 21:50:39 UTC
All locales fixed. Feel free to reopen this bug while we are still in the 2.30 development cycle or file a new bug report if you find an issue.