PHP Json_encode will convert the characters inside the array into a string similar to \u821c, is there any way not to turn? or reverse it, but still keep the JSON format.
Reply to discussion (solution)
When you read it with JS, it's kanji.
I know that JS read out is a Chinese character, but I need the answer is not what you say this, but I asked, and I did not say I was using JS read it ...
PHP 5.4 and later, you can add a second parameter Json_unescaped_unicode
or simply
$a = Array (' charset ' = ' Chinese '); array_walk_recursive ($a, function (& $v) {$v = UrlEncode ($v);}); Echo UrlDecode (Json_encode ($a));
{"CharSet": "Chinese"}
Don't even utf-8.
Reference: http://blog.csdn.net/fdipzone/article/details/28766357
PHP 5.4 and later, you can add a second parameter Json_unescaped_unicode
or simply
$a = Array (' charset ' = ' Chinese '); array_walk_recursive ($a, function (& $v) {$v = UrlEncode ($v);}); Echo UrlDecode (Json_encode ($a));
{"CharSet": "Chinese"}
Don't even utf-8.
My php5.4 CHM manual above actually did not write a second parameter, looks like to update the manual ...