(PHP 4 >= 4.0.6, PHP 5, PHP 7)
mb_detect_order — 锟斤拷锟斤拷/锟斤拷取 锟街凤拷锟斤拷锟斤拷募锟斤拷顺锟斤拷
为锟斤拷锟斤拷锟叫憋拷 encoding_list
锟斤拷锟斤拷锟皆讹拷锟斤拷锟斤拷址锟斤拷锟斤拷锟斤拷顺锟斤拷
encoding_list
encoding_list
锟斤拷一锟斤拷 array 锟斤拷锟竭讹拷锟脚分革拷锟斤拷锟街凤拷锟斤拷锟斤拷锟叫憋拷
锟轿硷拷支锟街的憋拷锟斤拷锟斤拷
锟斤拷锟绞★拷锟斤拷锟� encoding_list
锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟截碉拷前锟街凤拷锟斤拷锟斤拷锟斤拷顺锟斤拷锟斤拷锟斤拷椤�
锟斤拷锟斤拷锟矫伙拷影锟斤拷 mb_detect_encoding() 锟斤拷 mb_send_mail()锟斤拷
mbstring 锟斤拷前实锟斤拷锟斤拷锟斤拷锟铰憋拷锟斤拷锟斤拷筛选锟斤拷锟斤拷 锟斤拷锟斤拷锟斤拷锟铰憋拷锟斤拷锟叫憋拷锟斤拷锟叫э拷纸锟斤拷锟斤拷校锟斤拷锟斤拷锟侥硷拷饨拷锟绞э拷堋锟�
UTF-8, UTF-7, ASCII, EUC-JP,SJIS, eucJP-win, SJIS-win, JIS, ISO-2022-JP锟斤拷锟斤拷 ISO-8859-*锟斤拷mbstring 锟斤拷锟角硷拷锟轿� ISO-8859-*锟斤拷
锟斤拷锟斤拷 UTF-16锟斤拷UTF-32锟斤拷 UCS2 锟斤拷 UCS4锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟角伙拷失锟杰★拷
锟斤拷锟矫憋拷锟斤拷锟斤拷顺锟斤拷时锟津,成癸拷时锟斤拷锟斤拷 TRUE
锟斤拷识锟斤拷时锟津返伙拷 FALSE
锟斤拷
锟节伙拷取锟斤拷锟斤拷锟斤拷顺锟斤拷锟绞憋拷颍岱碉拷锟斤拷锟斤拷锟斤拷锟侥憋拷锟斤拷锟斤拷锟介。
Example #1 mb_detect_order() 锟斤拷锟斤拷
<?php
/* 为锟斤拷锟剿筹拷锟斤拷锟斤拷锟矫讹拷锟斤拷斜锟� */
mb_detect_order("eucjp-win,sjis-win,UTF-8");
/* 通锟斤拷锟斤拷锟斤拷锟斤拷锟矫硷拷锟剿筹拷锟� */
$ary[] = "ASCII";
$ary[] = "JIS";
$ary[] = "EUC-JP";
mb_detect_order($ary);
/* 锟斤拷示锟斤拷前锟侥硷拷锟剿筹拷锟� */
echo implode(", ", mb_detect_order());
?>
Example #2 锟斤拷锟斤拷展示锟斤拷锟斤拷效锟侥硷拷锟剿筹拷锟�
; 锟斤拷锟角硷拷锟轿� ISO-8859-1 detect_order = ISO-8859-1, UTF-8 ; 锟斤拷锟角硷拷锟轿� UTF-8锟斤拷锟斤拷锟斤拷 ASCII/UTF-7 锟斤拷值锟斤拷 UTF-8 锟斤拷锟斤拷效锟斤拷 detect_order = UTF-8, ASCII, UTF-7