#41403 [Opn->Csd]: json_decode cannot decode floats if localeconv decimal_point is not '.'
| From: | tony2001@php.net | Date: | Wed, 16 May 2007 12:54:34 +0000 |
| Subject: | #41403 [Opn->Csd]: json_decode cannot decode floats if localeconv decimal_point is not '.' | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-112690@lists.php.net to get a copy of this message | ||
ID: 41403
Updated by: tony2001@php.net
Reported By: rainer dot collet at gmx dot net
-Status: Open
+Status: Closed
-Bug Type: I18N and L10N related
+Bug Type: Unknown/Other Function
Operating System: debian etch
PHP Version: 5.2.2
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2007-05-15 17:44:30] rainer dot collet at gmx dot net
Description:
------------
if you set locale to for example de_DE json_decode will not decode
floats correctly anymore.
Reproduce code:
---------------
setlocale(LC_NUMERIC, 'de_DE');
var_dump(json_decode('[2.1]');
Expected result:
----------------
array(1) { [0]=> float(2.1) }
Actual result:
--------------
array(1) { [0]=> float(2) }
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=41403&edit=1