note 32264 deleted from function.utf8-encode by cmb
| From: | cmb@php.net | Date: | Sun, 22 Dec 2019 09:04:16 +0000 |
| Subject: | note 32264 deleted from function.utf8-encode by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-213587@lists.php.net to get a copy of this message | ||
Note Submitter: mualem_i at hotmail dot com
----
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("א","à",$VAL);
$VAL = str_replace("ב","á",$VAL);
$VAL = str_replace("ג","â",$VAL);
$VAL = str_replace("ד","ã",$VAL);
$VAL = str_replace("ה","ä",$VAL);
$VAL = str_replace("ו","å",$VAL);
$VAL = str_replace("ז","æ",$VAL);
$VAL = str_replace("ח","ç",$VAL);
$VAL = str_replace("ט","è",$VAL);
$VAL = str_replace("י","é",$VAL);
$VAL = str_replace("כ","ë",$VAL);
$VAL = str_replace("ל","ì",$VAL);
$VAL = str_replace("מ","î",$VAL);
$VAL = str_replace("נ","ð",$VAL);
$VAL = str_replace("ס","ñ",$VAL);
$VAL = str_replace("ע","ò",$VAL);
$VAL = str_replace("פ","ô",$VAL);
$VAL = str_replace("צ","ö",$VAL);
$VAL = str_replace("ק","÷",$VAL);
$VAL = str_replace("ר","ø",$VAL);
$VAL = str_replace("ש","ù",$VAL);
$VAL = str_replace("ת","ú",$VAL);
$VAL = str_replace("ך","ê",$VAL);
$VAL = str_replace("ף","ó",$VAL);
$VAL = str_replace("ן","ï",$VAL);
$VAL = str_replace("ם","í",$VAL);
$VAL = str_replace("ץ","õ",$VAL);
$VAL = str_replace(";","",$VAL);
$send_VAR .= $VAL." ";
}
return $send_VAR;
}