Bug #53507 [Opn->Csd]: json_encode of float value
| From: | iliaa@php.net | Date: | Sat, 11 Dec 2010 15:08:56 +0000 |
| Subject: | Bug #53507 [Opn->Csd]: json_encode of float value | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-156895@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=53507&edit=1
ID: 53507
Updated by: iliaa@php.net
Reported by: johann at infomaniak dot ch
Summary: json_encode of float value
-Status: Open
+Status: Closed
Type: Bug
Package: JSON related
Operating System: Linux
PHP Version: 5.2.14
-Assigned To:
+Assigned To: iliaa
Block user comment: N
Private report: N
New Comment:
Thank you for your bug report. This issue has already been fixed
in the latest released version of PHP, which you can download at
http://www.php.net/downloads.php
Previous Comments:
------------------------------------------------------------------------
[2010-12-09 15:05:49] johann at infomaniak dot ch
Description:
------------
json_encode of float doesn't work when a locale is define which use
comma (,) as separator (ex: fr_FR)
Test script:
---------------
$aReturn=array(
'fAmount' => 12.12
);
setlocale(LC_ALL, 'fr_FR');
print(json_encode($aReturn));
Expected result:
----------------
{"fAmount":12.12}
Actual result:
--------------
{"fAmount":12,12}
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=53507&edit=1