Re: [Json] Call for Consensus: Proposed Text for "8.1 Character Encoding"

John Cowan <cowan@ccil.org> Mon, 20 March 2017 16:44 UTC

Return-Path: <cowan@ccil.org>
X-Original-To: json@ietfa.amsl.com
Delivered-To: json@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id F22171294D8 for <json@ietfa.amsl.com>; Mon, 20 Mar 2017 09:44:40 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=ccil-org.20150623.gappssmtp.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ncRFB21UOzE8 for <json@ietfa.amsl.com>; Mon, 20 Mar 2017 09:44:39 -0700 (PDT)
Received: from mail-wr0-x22b.google.com (mail-wr0-x22b.google.com [IPv6:2a00:1450:400c:c0c::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id AD1BE1294D4 for <json@ietf.org>; Mon, 20 Mar 2017 09:44:37 -0700 (PDT)
Received: by mail-wr0-x22b.google.com with SMTP id u48so96304472wrc.0 for <json@ietf.org>; Mon, 20 Mar 2017 09:44:37 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ccil-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=xkqu2kbDkx7sMBWVNvBMRRmhRnJH3tLbY+edBQqYSLs=; b=WUUrqkHoGqIryU/NKlS7ijoDCi5IvMBWB6UmyZ9QfTtcl0lZgy4nOqST4M2da8OoNE u7hmY94BvRlf5xPSvN7CObciNZ24StdxDb3+kcKZ1PlLxqYkW58CgqzVE6ckCLTlJjKH zE6owmZMM0gmOS+rVjSTXyQBziu5L2JWk1GTeF1uL1TYyc3Rk8pLgcwvKTTzw9RVUJz6 p736dr510P5DRm6psz6Z4/UiibUMxuc/5Xa0l+1vFYv77palhZY29bxDXDBr5wbssNTg Y+SyD3i3HhVkI4bPaGUwUd+USCuNCYSWEPsIHhl62NNl8wNX0p/xp57qzvrOscw2J+EZ BHhA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=xkqu2kbDkx7sMBWVNvBMRRmhRnJH3tLbY+edBQqYSLs=; b=ReT0B8kH93OiuiCVoph+wvqN8NiF0TigIEzHoEOnI1a/LjkigSLwT/+QTebZItoP0W m0F7ou4AuBRokRnTwF2JCAvPi5Vt8miWjPwFbELZr0QdacI9TOgM/x1/Xd1xPPoE1KCr D1cFeWdMfG96OPd1/OjGVyXNRHAoFgaUx0O10CxpXE6w9e8TV6xffvZtRJuJT+0XdGwQ +pBiojFAALBzqMs68DC8vSi9rpUhbUuWy8iuzHwx3s3K5gLS2ebn4kHhUj4A9DkElKjX JP747gWlMyKLXdmw1D8gye8686+b075EQZmwiwV1MldwHr/dgDFmzi7/GoglP7xcQy9M /lAQ==
X-Gm-Message-State: AFeK/H26pzQt7D4uW9QOeDX9O3gjhAqxAS9NTNz0/hs4ijYTOLuxP6ZH4Ed43YFL1Xyyx/hiAyGzWjTkjGiIZA57
X-Received: by 10.223.152.215 with SMTP id w81mr29247472wrb.151.1490028276276; Mon, 20 Mar 2017 09:44:36 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.28.181.14 with HTTP; Mon, 20 Mar 2017 09:44:15 -0700 (PDT)
In-Reply-To: <804f9930-26a5-a565-0607-452b386cfeb5@outer-planes.net>
References: <1fb5849e-8dbf-835d-65b7-2403686248f9@outer-planes.net> <0E32A94D-CE12-4F52-9ED6-8743C49751B4@vpnc.org> <4d2f0fb3-a729-0c17-2394-bc1e005dd612@gmx.de> <d09f9a59-2411-45a0-470c-ea95072fe4fd@outer-planes.net> <dad91b19-e774-e239-36d2-9d086cca8e0d@gmx.de> <ac432615-ee84-3cdf-6b37-480626bd18c1@gmx.de> <804f9930-26a5-a565-0607-452b386cfeb5@outer-planes.net>
From: John Cowan <cowan@ccil.org>
Date: Mon, 20 Mar 2017 12:44:15 -0400
Message-ID: <CAD2gp_Rv-zLTsROyn6E6CTRqt381jAh4AXiwptRUzjXT3queKg@mail.gmail.com>
To: "Matthew A. Miller" <linuxwolf+ietf@outer-planes.net>
Cc: Julian Reschke <julian.reschke@gmx.de>, "json@ietf.org" <json@ietf.org>, The IESG <iesg@ietf.org>
Content-Type: multipart/alternative; boundary="001a113c36a61cf36a054b2c3e77"
Archived-At: <https://mailarchive.ietf.org/arch/msg/json/8Va2fV9rgXsCEZQNmTPsJ1vF7XU>
Subject: Re: [Json] Call for Consensus: Proposed Text for "8.1 Character Encoding"
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: "JavaScript Object Notation \(JSON\) WG mailing list" <json.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/json>, <mailto:json-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/json/>
List-Post: <mailto:json@ietf.org>
List-Help: <mailto:json-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/json>, <mailto:json-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 20 Mar 2017 16:44:41 -0000

On Mon, Mar 20, 2017 at 12:26 PM, Matthew A. Miller <
linuxwolf+ietf@outer-planes.net> wrote:

JSON text MUST be encoded in UTF-8, UTF-16, or UTF-32 Section 3 of
> [UNICODE].  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).  Text encoded in character
> encodings other than UTF-8, UTF-16, or UTF-32 cannot be used with
> the media tye "application/json".
>
> Implementations MUST NOT add a byte order mark (U+FEFF) to the
> beginning of a JSON text.  In the interests of interoperability,
> implementations that parse JSON texts MAY ignore the presence of a
> byte order mark rather than treating it as an error.
>
> Recipients that wish to support Unicode encodings other than UTF-8
> can do this using a detection mechanism that is based on the fact
> that the first character will always have a Unicode code point less
> or equal than 127, thus the UTF-16/32 variants can be detected by
> inspecting the first octets for nulls.
>

Two minor corrections: for "media tye" read "media type", and for
"less than or equal to 127" read "greater than 0 and less than 128".

--
John Cowan          http://vrici.lojban.org/~cowan        cowan@ccil.org
Fundamental thinking is ha-ard.  Let's go ideology-shopping.
                        --Philosopher Barbie