Re: [XHR] Sending a Document with a mismatched encoding

Cameron McCormack wrote:
> It seems to be possible to send a Document using XHR where the encoding
> specified by the Content-Type charset parameter differs from the actual
> encoding used to encode the serialisation.

For what it's worth, this got changed from Gecko 1.8 to Gecko 1.9. 
Firefox 3 will tweak the charset parameter to correspond to the 
inputEncoding of the Document being serialized (which is the encoding 
used for the serialization).

We discovered that this will in fact cause some issues, since some 
servers treat the data as UTF-8 no matter what headers we send, and the 
default inputEncoding in Gecko of documents created via createDocument 
is ISO-8859-1 at the moment.  We will likely change that to UTF-8...

Oh, and if there is no charset parameter to start with, Gecko will add 
one for both Document and String arguments, just like you suggest in 
your followup mail.

-Boris

Received on Monday, 9 June 2008 03:45:13 UTC