public function setUTF8($str){
$encode = mb_detect_encoding($str, array("ASCII","utf-8","GB2312","GBK","BIG5"));
if ($encode == "GBK"){
$str = mb_convert_encoding($str, "utf-8", "GBK");
$this->_up_code = true;
$this->_char_code = 'GBK';
}
if ($encode == "GB2312" || $encode == 'EUC-CN'){
$str = mb_convert_encoding($str, "utf-8", "GB2312");
$this->_char_code = 'GB2312';
$this->_up_code = true;
}
if ($encode == 'ASCII'){
$str = urldecode($str);
}
return $str;
}
《“格式转换”》 有 1 条评论
You made some decent points there. I looked on the internet for the subject matter and found most people will approve with your blog. Fredrick Trotman