php uxxx

header("Content-type: text/html; charset=utf-8"); 

对unicode码再进行解码,解码函数如下:

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);
}
原文地址:https://www.cnblogs.com/anjunact/p/7059739.html