为什么我的字符串在JSON中转换为UNICODE?JSON - 避免UNICODE转换
保存在JSON作为{"MyComment":"\u0113 "}
我想保存为{"MyComment":"%C4%93"}
PHP:
$MyComment = $_GET["MyComment"];
print_r($MyComment); //%C4%93
$results = array (array(
"MyComment" => $MyComment,
));
$inp = file_get_contents('Test.json');
$arr = json_decode($inp);
$results = array_merge($results, $arr);
$fp_login = fopen('Test.json', w);
fwrite($fp_login, json_encode($results));
fclose($fp_login);
什么是你的代码? –
哪个字符集被使用? – mischaZeng
对不起,添加我的代码] – SNos