$encode = mb_detect_encoding($str, array(“ASCII”,’UTF-8′,”GB2312″,”GBK”,’BIG5′));
$str= mb_convert_encoding($str, ‘UTF-8’, $encode);
版权声明:本文为andyzou221312原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
$encode = mb_detect_encoding($str, array(“ASCII”,’UTF-8′,”GB2312″,”GBK”,’BIG5′));
$str= mb_convert_encoding($str, ‘UTF-8’, $encode);