Detect string encoding in php4
How I can det开发者_如何学Cect string encoding without mb_* and iconv functions in php4
I don't understand, wouldn't you just use the function:
/* 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");
As described in the PHP.net manual?
精彩评论