W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2008

Re: [XHR] Some comments on "charset" in the Content-Type header

From: Anne van Kesteren <annevk@opera.com>
Date: Sat, 20 Sep 2008 02:45:25 +0200
To: "Boris Zbarsky" <bzbarsky@mit.edu>
Cc: "Julian Reschke" <julian.reschke@gmx.de>, public-webapps <public-webapps@w3.org>
Message-ID: <op.uhq8dzyx64w2qv@annevk-t60.oslo.opera.com>

On Fri, 19 Sep 2008 23:26:23 +0200, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> Anne van Kesteren wrote:
>> Well, correcting charset is fine. The suggestion for not putting it  
>> there at all unless the media type is text or it is already present  
>> makes some sense though.
>
> I might be convinced of that, I suppose...  but read on.
>
>>> In any case, my other example (JavaScript) remains.
>>  Is that being transmitted over XMLHttpRequest? And using a media type  
>> Internet Explorer does not support for ECMAScript?
>
> Probably, yes.  And same for application/json, I bet.

Well 1) quite a few browsers don't add charset automatically yet like  
Firefox and 2) these would always be encoded as UTF-8 because you can only  
get these as DOMString. UTF-8 can easily be detected server side and the  
author could do application/json;charset=UTF-8 to be sure. (Also, once  
JSON becomes something like a native data type we can add dedicated  
support for it.)


-- 
Anne van Kesteren
<http://annevankesteren.nl/>
<http://www.opera.com/>
Received on Saturday, 20 September 2008 00:45:32 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:27 GMT