tags:

views:

33

answers:

1

How I can detect string encoding without mb_* and iconv functions in php4

+1  A: 

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?

Abs