|
01-10-2008, 11:52
|
|
|
|
חבר מתאריך: 17.09.05
הודעות: 6,023
|
|
אחרי יומיים ארוכים של נסיונות ושני אשכולות שלא הועילו לי הצלחתי לפתור את הבעייה. קודם קידדתי את המחרוזת לUTF-8 ואז הפעלתי פונקציה שבניתי שמתאימה את הקידוד
קוד PHP:
$text = utf8_encode($text); $text = rtf_heb($text);
קוד PHP:
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; }
_____________________________________
|
|