Re: [Json] Proposed minimal change for strings

Paul Hoffman <paul.hoffman@vpnc.org> Wed, 03 July 2013 03:07 UTC

Return-Path: <paul.hoffman@vpnc.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 8326B11E8135 for <json@ietfa.amsl.com>; Tue, 2 Jul 2013 20:07:32 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.599
X-Spam-Level:
X-Spam-Status: No, score=-102.599 tagged_above=-999 required=5 tests=[AWL=0.000, BAYES_00=-2.599, USER_IN_WHITELIST=-100]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gbGH4BH7bBLo for <json@ietfa.amsl.com>; Tue, 2 Jul 2013 20:07:32 -0700 (PDT)
Received: from hoffman.proper.com (IPv6.Hoffman.Proper.COM [IPv6:2605:8e00:100:41::81]) by ietfa.amsl.com (Postfix) with ESMTP id 002FD21F9B0A for <json@ietf.org>; Tue, 2 Jul 2013 20:07:31 -0700 (PDT)
Received: from [10.20.30.90] (50-1-98-228.dsl.dynamic.sonic.net [50.1.98.228]) (authenticated bits=0) by hoffman.proper.com (8.14.5/8.14.5) with ESMTP id r6337UV9022107 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for <json@ietf.org>; Tue, 2 Jul 2013 20:07:31 -0700 (MST) (envelope-from paul.hoffman@vpnc.org)
Content-Type: text/plain; charset="us-ascii"
Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\))
From: Paul Hoffman <paul.hoffman@vpnc.org>
In-Reply-To: <20130703012614.GL31347@mercury.ccil.org>
Date: Tue, 02 Jul 2013 20:07:30 -0700
Content-Transfer-Encoding: quoted-printable
Message-Id: <2CD8DA4E-8E03-4B4A-AC99-166B7094DCF9@vpnc.org>
References: <9BACB3F2-F9BF-40C7-B4BA-C0C2F33E4278@vpnc.org> <20130703012614.GL31347@mercury.ccil.org>
To: "json@ietf.org WG" <json@ietf.org>
X-Mailer: Apple Mail (2.1508)
Subject: Re: [Json] Proposed minimal change for strings
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.12
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: <http://www.ietf.org/mail-archive/web/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: Wed, 03 Jul 2013 03:07:32 -0000

<hats on>

On Jul 2, 2013, at 6:26 PM, John Cowan <cowan@mercury.ccil.org> wrote:

> Paul Hoffman scripsit:
> 
>> Proposal 1 (allow all code units in their unescaped form):
>> 
>>    A string is a sequence of zero or more Unicode code units [UNICODE].
> 
> I object to this, because "code unit" is not well defined without
> mentioning its size.  I suppose it is 16-bit code units that are meant,
> but if so, that must be said.  "If Parliament does not mean what it says,
> it must say so."

It does not appear that the Unicode Standard requires mentioning its size, at least in the definition of "code unit" in D77.

>> In section 2.2 (Strings):
>>  Leave the production for "unescaped" as-is.
>> In section 3 (Encoding):
>>  Add "Some strings, notably those that have unescaped surrogate code units
>>  (value 0xD800 to 0xDFFF), cannot be encoded in UTF-8."
> 
> While this statement is true, it is not the whole truth, which is that
> unescaped surrogate code units cannot be encoded in *any* encoding.

John is correct. After further review, we should have worded the above as "...cannot be encoded in any Unicode encoding form".

--Paul Hoffman