Re: encoding of json

Pfew. So we should say UTF-8 by default, and implementation may decide to do otherwise or offer a flag to do so.

Ivan

> On 03 Jun 2015, at 18:16 , Gregg Kellogg <gregg@greggkellogg.net> wrote:
> 
> RFC 7159 indicates that any Unicode encoding is fine, and the default is UTF-8:
> 
> [[[
> JSON text SHALL be encoded in UTF-8, UTF-16, or UTF-32.  The default
>   encoding is UTF-8, and JSON texts that are encoded in UTF-8 are
>   interoperable in the sense that they will be read successfully by the
>   maximum number of implementations; there are many implementations
>   that cannot successfully read texts in other encodings (such as
>   UTF-16 and UTF-32).
> ]]]
> 
> Gregg Kellogg
> gregg@greggkellogg.net
> 
> [1] https://tools.ietf.org/html/rfc7159#page-9
>> On Jun 3, 2015, at 8:58 AM, Ivan Herman <ivan@w3.org> wrote:
>> 
>> I have just heard the remark from Addison that JSON is defined in terms of JavaScript, meaning that the encoding is utf-16 and not utf-8! This seems to be in line with
>> 
>> http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf
>> 
>> Ivan
>> 
>> ----
>> Ivan Herman, W3C
>> Digital Publishing Activity Lead
>> Home: http://www.w3.org/People/Ivan/
>> mobile: +31-641044153
>> ORCID ID: http://orcid.org/0000-0003-0782-2704
>> 
>> 
>> 
>> 
> 


----
Ivan Herman, W3C
Digital Publishing Activity Lead
Home: http://www.w3.org/People/Ivan/
mobile: +31-641044153
ORCID ID: http://orcid.org/0000-0003-0782-2704

Received on Wednesday, 3 June 2015 16:20:11 UTC