日期:2014-05-17  浏览次数:20565 次

json里的编码后的中文怎么还原
像这个“\u6d59\u6c5f\u7701\u676d”怎么还原回中文

------解决方案--------------------
json_decode
------解决方案--------------------
linux
$str=preg_replace("#\\\u([0-9a-f]{4})#ie", "iconv('UCS-2BE', 'UTF-8', pack('H4', '\\1'))", $str);

windows
$str=preg_replace("#\\\u([0-9a-f]{4})#ie", "iconv('UCS-2LE', 'UTF-8', pack('H4', '\\1'))", $str);

浙江省杭