04-08-2009, 20:11
|
|
|
|
חבר מתאריך: 01.05.06
הודעות: 7,861
|
|
אכן, ניסיתי כמעט כל קומבינציה אפשרית של שינויים...
הג'יבריש:
×
במסד הוא מציג אותו כ: "×" או "ש×".
עריכה: אאוריקה מצאתי!
משום מה הבעיה נוצרה כשהשתמשתי בפונק' htmlentities.
הוספתי לפרמטר הcharset את 'UTF-8' ועכשיו הכל עובד כראוי.
אבל הכיצד זה יתכן? הפונק' הזאת בחיים לא עשתה לי בעיות שכאלה
עכשיו אני רואה:
ציטוט:
Presently, the ISO-8859-1 character set is used as the default.
|
וקצת הסבר מהמגיבים ב php.net:
ציטוט:
A more important point is, when we use htmlspecialchars($s) in our code, it is automatically compatible with UTF-8 string. Otherwise, if we use htmlentities($s), and there happens to be foreign characters in the string $s in UTF-8 encoding, then htmlentities() is going to mess it up, as it modifies the byte 0x80 to 0xFF in the string to entities like é. (unless you specifically provide a second argument and a third argument to htmlentities(), with the third argument being "UTF-8").
|
בכל מקרה, תודה רבה (!!!) לך ולכל מי שעזר!
נערך לאחרונה ע"י netaneldj בתאריך 04-08-2009 בשעה 20:30.
|