|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2007-09-01 17:05 UTC] salo at laborint dot com
Description:
------------
If you do setlocale("estonia") on a windows machine then json_encode outputs floats with commas which will cause a parse error in all browsers. It should output dots
Reproduce code:
---------------
setlocale("estonia");
json_encode(array('float_test'=>10.12345));
Expected result:
----------------
{"float_test": 10.12345}
Actual result:
--------------
{"float_test": 10,12345}
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 07:00:01 2025 UTC |
Same problem here with setlocale("de"); and json_encode of a float.