I have a problem rendering content received through Ajax to my HTML page in Safari (v.4). The page is stored in UTF-8, the Ajax response is also encoded in UTF-8.
The downloaded content is analyzed, and then various types of lists are filled with the analyzed data. One of them is a simple <select>, where the parameter text is set using trivial code:
option.innerHTML = "";
option.appendChild(document.createTextNode(text));
There are french characters in my text. As a result of the code above, select> the element shows a variant with this French text, divided into 2 parts, where the separator (some kind of cool French letter) does not appear at all ...: (
Using
option.innerHTML = escapeGtLtAmp(text);
has the same result.
If the French content is set to innerHTML of some <div> then the text will be displayed not broken, but simply with non-English letters omitted.
In Firefox 2, everything works fine.
source
share