XML Declaration Required for UTF-8 AJAX
Jenni was adding some non-ASCII cards to her local Quisition instance and it wasn't working. The browser, Safari, was getting the wrong encoding.
Strangely, manually telling Safari the encoding didn't help. I suspected culprit might be AJAX as the problem was with content loaded asynchronously.
Sure enough, after being thrown off by a couple of red herrings, I found that the response to XMLHttpRequest, at least on Safari, requires an XML Declaration with encoding="utf-8" even though, according to the XML TR, it shouldn't.
Comments (2)
rapto on Nov. 15, 2006:
Add a Comment
Last Modified: Dec. 30, 2005
Author: jtauber
rakoth on May 26, 2006:
header('Content-Type: text/html; charset=utf-8');
Safari and some other browsers need to be told explicitly that its uft-8. Content-Type can be changed to meet your needs.