note 97902 added to function.mb-convert-encoding

From: Date: Fri, 14 May 2010 15:00:29 +0000
Subject: note 97902 added to function.mb-convert-encoding
Groups: php.notes 
Request: Send a blank email to php-notes+get-169241@lists.php.net to get a copy of this message
I've been trying to find the charset of a norwegian (with a lot of ø, æ, å) txt file written on a Mac, i've found it in this way: $text = "A strange string to pass, maybe with some ø, æ, å characters."; foreach(mb_list_encodings() as $chr){ echo mb_convert_encoding($text, 'UTF-8', $chr)." : ".$chr."<br>"; } The line that looks good, gives you the encoding it was written in. Hope can help someone ---- Server IP: 69.147.83.197 Probable Submitter: 212.71.74.2 ---- Manual Page -- http://www.php.net/manual/en/function.mb-convert-encoding.php Edit -- https://master.php.net/note/edit/97902 Del: integrated -- https://master.php.net/note/delete/97902/integrated Del: useless -- https://master.php.net/note/delete/97902/useless Del: bad code -- https://master.php.net/note/delete/97902/bad+code Del: spam -- https://master.php.net/note/delete/97902/spam Del: non-english -- https://master.php.net/note/delete/97902/non-english Del: in docs -- https://master.php.net/note/delete/97902/in+docs Del: other reasons-- https://master.php.net/note/delete/97902 Reject -- https://master.php.net/note/reject/97902 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#169241) next »