[转]在php中,知道汉字的unicode码,如何显示成汉字啊

function u2gbk($str){
  return preg_replace("/\\\u([\da-f]{4})/ie", 'iconv("UCS-2", "gb2312", pack("H4", "\1"))', $str);
}
echo u2gbk('\u65F0');
This article is posted by on , link is .

Leave a reply