note 84592 added to function.mb-detect-encoding
| From: | yaqy at qq dot com | Date: | Mon, 21 Jul 2008 05:14:56 +0000 |
| Subject: | note 84592 added to function.mb-detect-encoding | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-142408@lists.php.net to get a copy of this message | ||
/*
*QQ: 290359552
* conver to Utf8 if $str is not equals to 'UTF-8'
*/
function convToUtf8($str)
{
if( mb_detect_encoding($str,"UTF-8, ISO-8859-1, GBK")!="UTF-8" )
{
return iconv("gbk","utf-8",$str);
}
else
{
return $str;
}
}
----
Server IP: 221.194.139.225
Probable Submitter: 116.25.32.36
----
Manual Page -- http://www.php.net/manual/en/function.mb-detect-encoding.php
Edit -- https://master.php.net/note/edit/84592
Del: integrated -- https://master.php.net/note/delete/84592/integrated
Del: useless -- https://master.php.net/note/delete/84592/useless
Del: bad code -- https://master.php.net/note/delete/84592/bad+code
Del: spam -- https://master.php.net/note/delete/84592/spam
Del: non-english -- https://master.php.net/note/delete/84592/non-english
Del: in docs -- https://master.php.net/note/delete/84592/in+docs
Del: other reasons-- https://master.php.net/note/delete/84592
Reject -- https://master.php.net/note/reject/84592
Search -- https://master.php.net/manage/user-notes.php