function decodeunicode($str)
{
return preg_replace_callback(‘/\\\\u([0-9a-f]{4})/i’,
create_function(
‘$matches’,
‘return mb_convert_encoding(pack(“h*”, $matches[1]), “utf-8”, “ucs-2be”);’
),
$str);
}

$arr = array(‘name1′:”中文”,’name2′:’abc12’);
$jsonstr = decodeunicode(json_encode($arr));