James Tauber's Blog 2005/12/30


blog > 2005 > 12 >


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.

by : Created on Dec. 30, 2005 : Last modified Dec. 30, 2005 : (permalink)