PHP Unicode转utf-8

PHP Unicode转utf-8

function unicode_decode($name, $out_charset = 'UTF-8', $in_charset = 'UCS-2BE'){ // 转换编码,将Unicode编码转换成可以浏览的utf-8编码 $pattern = '/([\w]+)|(\\\u([\w]{4}))/i'; preg_match_all($pattern, $name,... 阅读详情