Edit report at https://bugs.php.net/bug.php?id=60083&edit=1
ID: 60083
User updated by: gman at xrbr dot com
Reported by: gman at xrbr dot com
Summary: NumberFormatter::formatCurrency wrong for CHF (Swiss
Francs)
-Status: Open
+Status: Closed
Type: Bug
Package: intl
Operating System: SuSE Linux
PHP Version: 5.3.8
Block user comment: N
Private report: N
New Comment:
They do not have "1 Rappen" coins! That is the reason.
Previous Comments:
------------------------------------------------------------------------
[2011-10-18 10:26:53] gman at xrbr dot com
Description:
------------
I am not from Switzerland, but as far as I know they do have "Rappen", and 1
CHF is equal to 100 Rappen.
So putting float 12.99 to NumberFormatter::formatCurrency should return the
said 12,99 ("," is the correct decimal separator for de_DE), but what it does
is to output 13,00 which is not correct!
Test script:
---------------
$varNumberFormatter1 = new NumberFormatter("de_DE", NumberFormatter::CURRENCY);
var_dump($varNumberFormatter1->formatCurrency(12.99, "CHF"));
$varNumberFormatter2 = new NumberFormatter("de_DE", NumberFormatter::CURRENCY);
var_dump($varNumberFormatter2->formatCurrency(12.99, "EUR"));
Expected result:
----------------
string(10) "12,99 CHF"
string(10) "12,99 â¬"
Actual result:
--------------
string(10) "13,00 CHF"
string(10) "12,99 â¬"
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=60083&edit=1