close
例1:
<?php
/* 使用當前的 detect_order 來檢測字符編碼 */
echo mb_detect_encoding($str);
/* "auto" 將根據 mbstring.language 來擴展 */
echo mb_detect_encoding($str, "auto");
/* 通過逗號分隔的列表來指定編碼列表 encoding_list */
echo mb_detect_encoding($str, "JIS, eucjp-win, sjis-win");
/* 使用數組來指定編碼列表 encoding_list */
$ary[] = "ASCII";
$ary[] = "JIS";
$ary[] = "EUC-JP";
echo mb_detect_encoding($str, $ary);
?>
全站熱搜