note 89690 deleted from function.utf8-encode by danbrown
| From: | danbrown@php.net | Date: | Thu, 19 Mar 2009 13:14:23 +0000 |
| Subject: | note 89690 deleted from function.utf8-encode by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-152141@lists.php.net to get a copy of this message | ||
Note Submitter: dan at birminghampr dot co dot uk
Reason: in docs
----
I use a function like this, rather than utf8_encode() alone, for fixing the encoding of unknown
data, for example the contents of get_meta_tags():
function FixEncoding($x){
if(mb_detect_encoding($x)=='UTF-8'){
return $x;
}else{
return utf8_encode($x);
}
}