|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-10-20 15:54 UTC] lbarnaud@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 05:00:02 2025 UTC |
Description: ------------ The json_encode and the json_decode functions bug with the degree character ( '?' ). Reproduce code: --------------- header("content-type: text"); $test = array(); $test['data'] = "test1?test2"; echo json_encode($test) . "\r\n"; print_r(json_decode('{"data":"test1?test2"}')); Expected result: ---------------- {"data":"test1?test2"} stdClass Object ( [data] => test1?test2 ) Actual result: -------------- {"data":"test1"}