|
Home
iRate! IceMelon IM Tutorials Headlines CoolSites PHP Functions |
Most Referenced Functions » google_pagerank() » preg_replace() » imagecreatefrompng() » site_pageranks() » imagepng() » imagedestroy() » imagestring() » imagecolorallocate() » htmlentities() » fopen() » preg_match() » header() » getimagesize() » htmlspecialchars() » ob_start() » session_start() » strstr() » ob_flush() » preg_match_all() » strpos() » flush() » setcookie() » str_replace() » array2vars() » nl2br() » preg_split() » ereg() » urlencode() » ereg_replace() » readgzfile() Become a sponsor for $15/month. Link is sitewide - PR5 homepage, 20+ PR4 pages, 90+ PR3 pages. Email dave[AT]icemelon[D0T]c0m. |
PHP Functions
Function: mb_detect_encoding (PHP 4 >= 4.0.6, PHP 5) mb_detect_encoding -- Detect character encodingDescriptionstring mb_detect_encoding ( string str [, mixed encoding_list [, bool strict]] )mb_detect_encoding() detects character encoding in string str . It returns detected character encoding. encoding_list is list of character encoding. Encoding order may be specified by array or comma separated list string. If encoding_list is omitted, detect_order is used.
Example 1. mb_detect_encoding() example <?php /* 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"); /* Use array to specify encoding_list */ $ary[] = "ASCII"; $ary[] = "JIS"; $ary[] = "EUC-JP"; echo mb_detect_encoding($str, $ary); ?> Related Function(s) |