note 94058 added to function.iconv

From: Date: Wed, 14 Oct 2009 11:53:49 +0000
Subject: note 94058 added to function.iconv
Groups: php.notes 
Request: Send a blank email to php-notes+get-161725@lists.php.net to get a copy of this message
to test different combinations of convertions between charsets (when we don't know the source charset and what is the convenient destination charset) this is an example : $tab = array("UTF-8", "ASCII", "Windows-1252", "ISO-8859-15", "ISO-8859-1", "ISO-8859-6", "CP1256"); $chain = ""; foreach ($tab as $i) { foreach ($tab as $j) { $chain .= " $i$j ".iconv($i, $j, "$my_string"); } } echo $chain; then after displaying, you use the $i$j that shows good displaying. NB: you can add other charsets to $tab to test other cases. ---- Server IP: 69.147.83.197 Probable Submitter: 41.140.16.204 ---- Manual Page -- http://www.php.net/manual/en/function.iconv.php Edit -- https://master.php.net/note/edit/94058 Del: integrated -- https://master.php.net/note/delete/94058/integrated Del: useless -- https://master.php.net/note/delete/94058/useless Del: bad code -- https://master.php.net/note/delete/94058/bad+code Del: spam -- https://master.php.net/note/delete/94058/spam Del: non-english -- https://master.php.net/note/delete/94058/non-english Del: in docs -- https://master.php.net/note/delete/94058/in+docs Del: other reasons-- https://master.php.net/note/delete/94058 Reject -- https://master.php.net/note/reject/94058 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#161725) next »