All strings after this character cannot be saved. In any case, the "-" cannot be converted successfully or output. In addition, mb_convert_encoding does not have this bug.
*/
Header ("content-type: text/html; charset = utf-8 ");
Echo mb_convert_encoding ("You are my friends", "UTF-8", "gbk ");
// Gbk to gb2312
Header ("content-type: text/html; charset = big5 ");
Echo mb_convert_encoding ("You are my friend", "big5", "gb2312 ");
$ Content = iconv ("gbk", "UTF-8", $ content );
$ Content = mb_convert_encoding ($ content, "UTF-8", "gbk ");
/*
Generally, iconv is used. The mb_convert_encoding function is used only when the encoding of the original encoding cannot be determined or The iconv cannot be normally displayed after conversion.
Highlights: If you do not know your current character encoding, you can use mb_detect_encoding to detect your character encoding.
For more information, see
Http://www.111cn.net/phper/php-cy/36263.htm