Bug #78056 [Opn->Nab]: Wrong currency format for nl_BE with money_format
| From: | requinix@php.net | Date: | Thu, 23 May 2019 14:25:25 +0000 |
| Subject: | Bug #78056 [Opn->Nab]: Wrong currency format for nl_BE with money_format | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-220972@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=78056&edit=1
ID: 78056
Updated by: requinix@php.net
Reported by: wesley at weha dot be
-Summary: Wrong currency format for nl_BE
+Summary: Wrong currency format for nl_BE with money_format
-Status: Open
+Status: Not a bug
Type: Bug
-Package: Unknown/Other Function
+Package: Strings related
Operating System: Centos 7.6
PHP Version: 7.3.5
Block user comment: N
Private report: N
New Comment:
The output of money_format is controlled by your system's strfmon(3) function, not PHP.
Looks like your locale settings are way out of date: CLDR 26 (the relevant standard for this stuff)
is the last time the NL locale was set to use the "¤ #,##0.00-" format, and CLDR 27
changed it to "¤ -#,##0.00" - that was back in 2015.
Update your system and/or locale settings.
Previous Comments:
------------------------------------------------------------------------
[2019-05-23 14:09:04] wesley at weha dot be
Description:
------------
When I use nl_BE locale I get the wrong format for negative values.
-1234.56 should be ⬠-1 234,56
money_format gives this: ⬠1 234,56-
I'm sorry if anything is filled in wrong, first time here.
thank you.
Test script:
---------------
setlocale(LC_ALL, 'nl_BE.UTF-8')
echo money_format('%.2n','-1234.56');
Expected result:
----------------
⬠-1 234,56
Actual result:
--------------
⬠1 234,56-
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=78056&edit=1