检测php4中的字符串编码

时间:2010-04-14 17:44:59

标签: php character-encoding

如何在php4

中没有mb_ *和iconv函数的情况下检测字符串编码

1 个答案:

答案 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?

中所述