From:
Operating system:
PHP version: 5.3.5
Package: I18N and L10N related
Bug Type: Bug
Bug description:NumberFormat::parse fail with French thousands separator
Description:
------------
NumberFormat::parse fail with French thousands separator (space)
Test script:
---------------
$nombre = '1234,56';
$fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
var_dump($fmt->format($nombre));
$nombre = '1 234,56';
$fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
var_dump($fmt->parse($nombre));
$nombre = '1234,56';
$fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
var_dump($fmt->parse($nombre));
Expected result:
----------------
string(9) "1 234,56"
float(1234.56)
float(1234.56)
Actual result:
--------------
string(9) "1 234,56"
float(1)
float(1234.56)
--
Edit bug report at http://bugs.php.net/bug.php?id=53791&edit=1
--
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=53791&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=53791&r=trysnapshot53
Try a snapshot (trunk):
http://bugs.php.net/fix.php?id=53791&r=trysnapshottrunk
Fixed in SVN:
http://bugs.php.net/fix.php?id=53791&r=fixed
Fixed in SVN and need be documented:
http://bugs.php.net/fix.php?id=53791&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=53791&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=53791&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=53791&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=53791&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=53791&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=53791&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=53791&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=53791&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=53791&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=53791&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=53791&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=53791&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=53791&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=53791&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=53791&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=53791&r=mysqlcfg