Re: [Json] Naked surrogates already banned?

R S <sayrer@gmail.com> Fri, 18 October 2013 02:26 UTC

Return-Path: <sayrer@gmail.com>
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 46C1411E80FA for <json@ietfa.amsl.com>; Thu, 17 Oct 2013 19:26:29 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.97
X-Spam-Level:
X-Spam-Status: No, score=-1.97 tagged_above=-999 required=5 tests=[AWL=0.029, BAYES_00=-2.599, HTML_MESSAGE=0.001, J_CHICKENPOX_14=0.6, NO_RELAYS=-0.001]
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 GGkMGjXaUqUc for <json@ietfa.amsl.com>; Thu, 17 Oct 2013 19:26:28 -0700 (PDT)
Received: from mail-qc0-x230.google.com (mail-qc0-x230.google.com [IPv6:2607:f8b0:400d:c01::230]) by ietfa.amsl.com (Postfix) with ESMTP id AD84B21F9CC5 for <json@ietf.org>; Thu, 17 Oct 2013 19:26:28 -0700 (PDT)
Received: by mail-qc0-f176.google.com with SMTP id s19so775071qcw.35 for <json@ietf.org>; Thu, 17 Oct 2013 19:26:18 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=A4OzIEPqLqOUtx7FDTENKMrPhf8rHdAhMT9UVQ4NV4U=; b=m/rhGKxTNffpU+UlUrVz2MpEKbb7qoAq/YaNebYD/zgnnlwkKYG1qTtNIfiCcNVa7w QqfOSqmNv0cxG4yiRC/dsxnXGcYuwkbi3jwBMnzP/5ID9uUWraaI7ur6henJGoqO9v2f AEohB88Xeo6E1QtRs3MxJAqzqtWS3O8LRazBj/ieIcS+bMXkZMNzmEeVGRULrySFetDZ O3C4cn1G96uuxnmLTJ3aDawzYrPyFCb0qFMKju/ABpQJMIywVn8n7bsbB/T5qdP4snEt j/oK688Ec70CneXN9sVnfTX7ct1hcp4n2IdwzTbSc9lh0gYYp3kp97X1g3qmPxhUgmOL yKVg==
MIME-Version: 1.0
X-Received: by 10.224.11.133 with SMTP id t5mr1483211qat.34.1382063177964; Thu, 17 Oct 2013 19:26:17 -0700 (PDT)
Received: by 10.224.7.9 with HTTP; Thu, 17 Oct 2013 19:26:17 -0700 (PDT)
In-Reply-To: <CA+mHimNgVXVSwFxrLZoQZ1N+GPvhxT0NLPPCxJiDQEXamqQvJQ@mail.gmail.com>
References: <CAHBU6itESY9bzSZ-0VnLq-VNcPg_LbR_q-kuaVzTyLQL9tTKcw@mail.gmail.com> <CA+mHimNgVXVSwFxrLZoQZ1N+GPvhxT0NLPPCxJiDQEXamqQvJQ@mail.gmail.com>
Date: Thu, 17 Oct 2013 19:26:17 -0700
Message-ID: <CAChr6Sz2a_1R1o5pLPKi-87iCV_ASC74VP796h8LS=oxRYTXTQ@mail.gmail.com>
From: R S <sayrer@gmail.com>
To: Stephen Dolan <stephen.dolan@cl.cam.ac.uk>
Content-Type: multipart/alternative; boundary="001a11c2b0acc7a13f04e8faa8e4"
Cc: Tim Bray <tbray@textuality.com>, "json@ietf.org" <json@ietf.org>
Subject: Re: [Json] Naked surrogates already banned?
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: Fri, 18 Oct 2013 02:26:29 -0000

$ python
Python 2.7.4 (default, Oct  6 2013, 14:58:34)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import json
>>> json.loads('{"a": "\uDEAD"}')
{u'a': u'\udead'}
>>>


On Thu, Oct 17, 2013 at 6:59 PM, Stephen Dolan
<stephen.dolan@cl.cam.ac.uk>wrote:

> On Fri, Oct 18, 2013 at 2:36 AM, Tim Bray <tbray@textuality.com> wrote:
> > But U+DEAD is not a character.  So a narrow reading would make that
> illegal.
> > Not that any implementation I’ve encountered enforces that. -T
>
> Several do, including libjansson, Python and Perl. In fact, I suspect
> that most implementations on platforms that haven't baked in UTF16 as
> the One True Unicode (javascript, JVM) reject your example.
>
> Stephen
> _______________________________________________
> json mailing list
> json@ietf.org
> https://www.ietf.org/mailman/listinfo/json
>