如何在php4
中没有mb_ *和iconv函数的情况下检测字符串编码答案 0 :(得分:1)
我不明白,你不会只使用这个功能:
/* Detect character encoding with current detect_order */
echo mb_detect_encoding($str);
/* "auto" is expanded to "ASCII,JIS,UTF-8,EUC-JP,SJIS" */
echo mb_detect_encoding($str, "auto");
/* Specify encoding_list character encoding by comma separated list */
echo mb_detect_encoding($str, "JIS, eucjp-win, sjis-win");
如PHP.net manua l?
中所述