note 113420 added to function.mb-detect-encoding

From: Date: Tue, 08 Oct 2013 21:17:08 +0000
Subject: note 113420 added to function.mb-detect-encoding
Groups: php.notes 
Request: Send a blank email to php-notes+get-196502@lists.php.net to get a copy of this message
// ----------------------------------------------------------- if(!function_exists('mb_detect_encoding')) { function mb_detect_encoding($string, $enc=null, $ret=true) { $out=$enc; static $list = array('utf-8', 'iso-8859-1', 'iso-8859-15', 'windows-1251'); foreach ($list as $item) { $sample = iconv($item, $item, $string); if (md5($sample) == md5($string)) { $out = ($ret !== false) ? true : $item; } } return $out; } } // ----------------------------------------------------------- ---- Server IP: 69.147.83.199 Probable Submitter: 178.26.155.228 ---- Manual Page -- http://php.net/manual/en/function.mb-detect-encoding.php Edit -- https://master.php.net/note/edit/113420 Del: integrated -- https://master.php.net/note/delete/113420/integrated Del: useless -- https://master.php.net/note/delete/113420/useless Del: bad code -- https://master.php.net/note/delete/113420/bad+code Del: spam -- https://master.php.net/note/delete/113420/spam Del: non-english -- https://master.php.net/note/delete/113420/non-english Del: in docs -- https://master.php.net/note/delete/113420/in+docs Del: other reasons-- https://master.php.net/note/delete/113420 Reject -- https://master.php.net/note/reject/113420 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#196502) next »