W3C home > Mailing lists > Public > public-webapi@w3.org > June 2008

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

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Sun, 08 Jun 2008 22:44:11 -0500
Message-ID: <484CA70B.50203@mit.edu>
To: public-webapi@w3.org

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.

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

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:16:27 UTC