W3C home > Mailing lists > Public > public-csv-wg@w3.org > June 2015

Re: encoding of json

From: Gregg Kellogg <gregg@greggkellogg.net>
Date: Wed, 3 Jun 2015 09:16:52 -0700
Cc: Jeremy Tandy <jeremy.tandy@gmail.com>, W3C CSV on the Web Working Group <public-csv-wg@w3.org>
Message-Id: <F69C22A0-5FEA-47CC-B948-F3B8C47B0A30@greggkellogg.net>
To: Ivan Herman <ivan@w3.org>
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

[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
Received on Wednesday, 3 June 2015 16:17:22 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 3 June 2015 16:17:23 UTC