note 32264 added to function.utf8-encode

From: Date: Wed, 21 May 2003 23:12:28 +0000
Subject: note 32264 added to function.utf8-encode
Groups: php.notes 
Request: Send a blank email to php-notes+get-48797@lists.php.net to get a copy of this message
Hebrew!! What a language. I had some trouble placing the Hebrew in a javascript based drop down menu, the text appeared as UTF8 so I made this function to overcome the problem (Not talking about efficiency) function rtf_heb($string) { $array = split (" ",$string) ; foreach ($array as $VAL) { $VAL = str_replace("&#1488","à",$VAL); $VAL = str_replace("&#1489","á",$VAL); $VAL = str_replace("&#1490","â",$VAL); $VAL = str_replace("&#1491","ã",$VAL); $VAL = str_replace("&#1492","ä",$VAL); $VAL = str_replace("&#1493","å",$VAL); $VAL = str_replace("&#1494","æ",$VAL); $VAL = str_replace("&#1495","ç",$VAL); $VAL = str_replace("&#1496","è",$VAL); $VAL = str_replace("&#1497","é",$VAL); $VAL = str_replace("&#1499","ë",$VAL); $VAL = str_replace("&#1500","ì",$VAL); $VAL = str_replace("&#1502","î",$VAL); $VAL = str_replace("&#1504","ð",$VAL); $VAL = str_replace("&#1505","ñ",$VAL); $VAL = str_replace("&#1506","ò",$VAL); $VAL = str_replace("&#1508","ô",$VAL); $VAL = str_replace("&#1510","ö",$VAL); $VAL = str_replace("&#1511","÷",$VAL); $VAL = str_replace("&#1512","ø",$VAL); $VAL = str_replace("&#1513","ù",$VAL); $VAL = str_replace("&#1514","ú",$VAL); $VAL = str_replace("&#1498","ê",$VAL); $VAL = str_replace("&#1507","ó",$VAL); $VAL = str_replace("&#1503","ï",$VAL); $VAL = str_replace("&#1501","í",$VAL); $VAL = str_replace("&#1509","õ",$VAL); $VAL = str_replace(";","",$VAL); $send_VAR .= $VAL." "; } return $send_VAR; } ---- Manual Page -- http://www.php.net/manual/en/function.utf8-encode.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+32264 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+32264&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+32264&report=yes

« previous php.notes (#48797) next »