Re: [apps-discuss] draft-pbryan-zyp-json-pointer: name syntax for non-ASCII

"Martin J. Dürst" <duerst@it.aoyama.ac.jp> Thu, 24 November 2011 07:43 UTC

Return-Path: <duerst@it.aoyama.ac.jp>
X-Original-To: apps-discuss@ietfa.amsl.com
Delivered-To: apps-discuss@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 7ED5C21F84DA for <apps-discuss@ietfa.amsl.com>; Wed, 23 Nov 2011 23:43:01 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -99.727
X-Spam-Level:
X-Spam-Status: No, score=-99.727 tagged_above=-999 required=5 tests=[AWL=0.063, BAYES_00=-2.599, HELO_EQ_JP=1.244, HOST_EQ_JP=1.265, MIME_8BIT_HEADER=0.3, 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 V-mEld-JghOj for <apps-discuss@ietfa.amsl.com>; Wed, 23 Nov 2011 23:43:01 -0800 (PST)
Received: from scintmta02.scbb.aoyama.ac.jp (scintmta02.scbb.aoyama.ac.jp [133.2.253.34]) by ietfa.amsl.com (Postfix) with ESMTP id D759521F84D4 for <apps-discuss@ietf.org>; Wed, 23 Nov 2011 23:43:00 -0800 (PST)
Received: from scmse02.scbb.aoyama.ac.jp ([133.2.253.231]) by scintmta02.scbb.aoyama.ac.jp (secret/secret) with SMTP id pAO7gxuM020803 for <apps-discuss@ietf.org>; Thu, 24 Nov 2011 16:42:59 +0900
Received: from (unknown [133.2.206.133]) by scmse02.scbb.aoyama.ac.jp with smtp id 6725_5f90_eeacf740_166f_11e1_afe4_001d096c5782; Thu, 24 Nov 2011 16:42:59 +0900
Received: from [IPv6:::1] ([133.2.210.1]:42384) by itmail.it.aoyama.ac.jp with [XMail 1.22 ESMTP Server] id <S157194F> for <apps-discuss@ietf.org> from <duerst@it.aoyama.ac.jp>; Thu, 24 Nov 2011 16:43:03 +0900
Message-ID: <4ECDF582.1070703@it.aoyama.ac.jp>
Date: Thu, 24 Nov 2011 16:42:58 +0900
From: "\"Martin J. Dürst\"" <duerst@it.aoyama.ac.jp>
Organization: Aoyama Gakuin University
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.9) Gecko/20100722 Eudora/3.0.4
MIME-Version: 1.0
To: Martin Thomson <martin.thomson@gmail.com>
References: <4ECA5C66.1040305@gmx.de> <1321903463.1990.16.camel@neutron> <4ECAA9FE.6080802@gmx.de> <1321905599.1990.23.camel@neutron> <4ECAAF39.8000702@gmx.de> <1321906189.1990.26.camel@neutron> <4ECAB0BC.0@gmx.de> <6462023D-F767-45DE-9AF0-011CC48374CF@mnot.net> <F7E6E395-463D-4D0C-A352-EAD4B5A27202@tzi.org> <4ECB9E69.8090505@gmx.de> <CABkgnnXk7K2ZGS-1-rjm8zeCUbyUM3PbmkNzt4wjM4CPGXFkPg@mail.gmail.com> <4ECCB8FA.20804@gmx.de> <1322071926.6133.20.camel@neutron> <BDF22250-C431-4F8F-9993-3055B61B0594@tzi.org> <CABkgnnUqqO=FBKWpHJFzjSGCnmTFVyu45Qff43Z=kLh1cz=AFQ@mail.gmail.com>
In-Reply-To: <CABkgnnUqqO=FBKWpHJFzjSGCnmTFVyu45Qff43Z=kLh1cz=AFQ@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: 8bit
Cc: apps-discuss@ietf.org
Subject: Re: [apps-discuss] draft-pbryan-zyp-json-pointer: name syntax for non-ASCII
X-BeenThere: apps-discuss@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: General discussion of application-layer protocols <apps-discuss.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/apps-discuss>, <mailto:apps-discuss-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/apps-discuss>
List-Post: <mailto:apps-discuss@ietf.org>
List-Help: <mailto:apps-discuss-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/apps-discuss>, <mailto:apps-discuss-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 24 Nov 2011 07:43:01 -0000

On 2011/11/24 10:59, Martin Thomson wrote:
> On 24 November 2011 08:37, Carsten Bormann<cabo@tzi.org>  wrote:
>> As usual, the guiding principle is that easy things should be easy, and that hard things should be possible.
>> Complicating the usual case (the only one that many people seem to have thought about yet) is indeed a big no-no.
>>
>> Grüße, Carsten
>
> A reasonable suggestion.  Maybe just drop the quotes and force an
> escape for / instead of ":
>
>    /Bjørn\/Carsten\/foo \uD834\uDD1E

For the moment, cutting off the surrogate pair at the end, and adding 
something to keep the space visible:

     /Bjørn\/Carsten\/foo bar


Yes indeed. So when defining json pointers, use '\/' to escape a '/' 
(and use '\\' to escape '\') that's part of a string rather than a 
hierarchy delimiter:

     /Bjørn\/Carsten\/foo bar

Then when using that as a fragment identifier, you have to escape the 
'\' (not allowed in URIs/IRIs), and of course the space, but not the '/':

     #/Bjørn%5C/Carsten%5C/foo%20bar

Now I really have no clue why surrogate pairs have to be escaped. Why 
not just use the character? This one didn't show in my mailer or 
browser, but one would assume that mostly the ones that actually show, 
at least in some places, will get used. So the actual pointer would be:

     /Bjørn\/Carsten\/foo 𝄞

In a fragment (IRI), that would look like:

     #/Bjørn%5C/Carsten%5C/foo%20𝄞

If an URI fragment is needed, use UTF-8 and %-encoding:

     #/Bj%C3%B8rn%5C/Carsten%5C/foo%20%F0%9D%84%9E

Regards,    Martin.