|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-09-18 12:54 UTC] jani@php.net
[2009-09-18 13:29 UTC] scottmac@php.net
[2010-04-01 15:13 UTC] arievanziel at gmail dot com
[2010-04-07 13:21 UTC] pcdinh at gmail dot com
[2010-12-27 23:19 UTC] gtrujillos at gmail dot com
[2010-12-27 23:20 UTC] gtrujillos at gmail dot com
[2012-07-02 16:58 UTC] gudjonj at gmail dot com
[2013-10-28 17:09 UTC] herrero dot olivari at gmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 04:00:01 2025 UTC |
Description: ------------ At my specific case, if a string contains an Euro symbol ( ? ), json_encode will return null for that string. It might also happens with other special characters. Reproduce code: --------------- <?php $array = array( 'name' => htmlentities( 'My euro symbol ?.' ) ); var_dump( $array ); var_dump( json_encode( $array ) ); Expected result: ---------------- array(1) { ["name"]=> string(29) "My euro symbol €." } string(13) "{"name":"My euro symbol €."}" Actual result: -------------- array(1) { ["name"]=> string(29) "My euro symbol â?¬." } string(13) "{"name":null}"