
|
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7">mb_detect_order (PHP 4 >= 4.0.6) mb_detect_order --
æ–‡å—ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°æ¤œå‡ºé †åºã®è¨å®š/å–å¾—
説明array mb_detect_order ( [mixed encoding-list])
mb_detect_order()ã¯ã€è‡ªå‹•æ–‡å—エンコーディング
検出ã®é †ç•ªã‚’encoding-listã«è¨å®šã—ã¾ã™ã€‚
æˆåŠŸæ™‚ã«TRUEã€å¤±æ•—時ã«
FALSEã‚’è¿”ã—ã¾ã™ã€‚
encoding-listã¯é…列ã¾ãŸã¯ã‚«ãƒ³ãƒžåŒºåˆ‡ã‚Šã®æ–‡
å—エンコーディングã®ãƒªã‚¹ãƒˆã§ã™ã€‚("auto" ã¯ã€
"ASCII, JIS, UTF-8, EUC-JP, SJIS"ã«å±•é–‹ã•れã¾ã™ã€‚)
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ã®å ´åˆã€ã‚¨ãƒ³ã‚³ãƒ¼
ディング検出ã¯å¸¸ã«å¤±æ•—ã—ã¾ã™ã€‚
例 1ç„¡æ„味ãªé †ç•ªã®ä¾‹ ; 常ã«ISO-8859-1ã¨ã—ã¦æ¤œå‡ºã•れる
detect_order = ISO-8859-1, UTF-8
; ASCII/UTF-7ã®å€¤ã¯UTF-8ã¨ã—ã¦æœ‰åйãªãŸã‚ã€å¸¸ã«UTF-8ã¨ã—ã¦æ¤œå‡ºã•れる。
detect_order = UTF-8, ASCII, UTF-7 |
|
例 2mb_detect_order()ã®ä¾‹ /* ãƒªã‚¹ãƒˆã§æ¤œå‡ºé †ã‚’è¨å®š */
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()); |
|
mb_internal_encoding(),
mb_http_input(),
mb_http_output(),
mb_send_mail()ã‚‚å‚照下ã•ã„。
|