开发者

Detect string encoding in php4

开发者 https://www.devze.com 2022-12-26 16:32 出处:网络
How I can det开发者_如何学Cect string encoding without mb_* and iconv functions in php4I don\'t understand, wouldn\'t you just use the function:

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?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号