mb_detect_order

(PHP 4 CVS only)

mb_detect_order --  Set/Get character encoding detection order

Description

array mb_detect_order ([mixed encoding-list])

mb_detect_order() sets automatic character encoding detection order to encoding-list. It returns TRUE for success, FALSE for failure.

encoding-list is array or comma separated list of character encodings. ("auto" is expanded to "ASCII, JIS, UTF-8, EUC-JP, SJIS")

If encoding-list is omitted, it returns current character encoding detection order as array.

This setting affects mb_detect_encoding() and mb_send_mail().

Example 1. mb_detect_order() examples


/* Set detection order by enumerated list */
mb_detect_order("eucjp-win,sjis-win,UTF-8");

/* Set detection order by array */
$ary[] = "ASCII";
$ary[] = "JIS";
$ary[] = "EUC-JP";
mb_detect_order($ary);

/* Display current detection order */
echo implode(", ", mb_detect_order());
      

See also mb_internal_encoding(), mb_http_input(), mb_http_output() mb_send_mail()


HIVE: All information for read only. Please respect copyright!
Hosted by hive КГБ: Киевская городская библиотека