-
-
$str='Scripting School: http://bbs.it-home.org'; - echo mb_convert_encoding($str, "utf-8"); / /Encoding to utf-8
$str='Programmer's Home: http://bbs.it-home.org';
- echo mb_convert_encoding($str, "utf-8" , "gbk"); //The original encoding is known to be gbk, converted to utf-8
$str='Programmer's Home: http://bbs.it-home.org' ;
- echo mb_convert_encoding($str, "utf-8", "auto"); //Unknown original encoding, after automatic detection by auto, convert the encoding to utf-8
- ?>
-
Copy code
|