zhangjingyu
楼上的测试结果经过几次调试输出,没想到最后测试再次转换后的编码时竟然还是utf-8的,到底为什么?
$str5=utf8ToNumericEntities($str4);
$str6=str_replace('&#','',$str5);
$str7 = html_entity_decode($str5, ENT_QUOTES, 'GBK');
$encode = mb_detect_encoding($str7, array('ASCII','UTF-8','GB2312','GBK','BIG5'));
echo "$str4";
echo("");
echo "123456".$str5;
echo("");
echo "$str6";
echo("");
echo "$str7";
echo("");
echo "$encode";

