方案1: $str = iconv("gb2312","utf-8",$str); 方案2: mb_convert_encoding($str, "utf-8", "gb2312"); 转载于:https://www.cnblogs.com/tine/p/7216808.html