Re: [Ltru] [apps-discuss] Defining a CBOR tag for RFC 5646Language Tags

"Peter Occil" <poccil14@gmail.com> Mon, 19 May 2014 22:35 UTC

Return-Path: <poccil14@gmail.com>
X-Original-To: ltru@ietfa.amsl.com
Delivered-To: ltru@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 202621A0413; Mon, 19 May 2014 15:35:16 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 0.588
X-Spam-Level:
X-Spam-Status: No, score=0.588 tagged_above=-999 required=5 tests=[BAYES_20=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, SPF_PASS=-0.001, STOX_REPLY_TYPE=0.439] autolearn=no
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 Hpn_f1eSWxjj; Mon, 19 May 2014 15:35:13 -0700 (PDT)
Received: from mail-qg0-x22e.google.com (mail-qg0-x22e.google.com [IPv6:2607:f8b0:400d:c04::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 937761A038B; Mon, 19 May 2014 15:35:13 -0700 (PDT)
Received: by mail-qg0-f46.google.com with SMTP id q108so9846703qgd.33 for <multiple recipients>; Mon, 19 May 2014 15:35:12 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:from:to:references:in-reply-to:subject:date:mime-version :content-type:content-transfer-encoding:importance; bh=I1dJiZJQZGk4MlefvEoOG4+ge/Olxk1hOgbyAkUznxM=; b=xoBzU2n0oC2zApSIO4mf0h6uQKA0oMB6bdDvt2DjjxAhifUhzUvXxKhHNBMToZGO+z CudAw6QP+MbpUITG6F9p8kRL02fgW0oLZc+hgw21d82o724CSxvSf1Gz/JIt7xHebkE0 GHBB6TOBEazCGxrfst8CBJSYGWJF+0XNxzAA8o1awfDQIIHnW2YeKfzHSlEkthVtG5Al LkI9Fnv+UUsz63VlrH9aYHGJ7wf1o1EPJgwRbEbW8sTGBmDDl3ODcvdtb9PEPCmFFc+E Lshod0+3hT9hr4VxM6gDICqRuE1N5NDQNkMtP+8Z99IbO7N2FpWN0UFRiG7hS1ECEnMO ag9A==
X-Received: by 10.224.55.83 with SMTP id t19mr52510487qag.42.1400538912891; Mon, 19 May 2014 15:35:12 -0700 (PDT)
Received: from PeterPC (c-50-169-108-108.hsd1.ma.comcast.net. [50.169.108.108]) by mx.google.com with ESMTPSA id w4sm19886151qat.5.2014.05.19.15.35.11 for <multiple recipients> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 19 May 2014 15:35:12 -0700 (PDT)
Message-ID: <2C9B140A7DFC42BEAE99AAA458EC9354@PeterPC>
From: "Peter Occil" <poccil14@gmail.com>
To: "Joe Hildebrand \(jhildebr\)" <jhildebr@cisco.com>, "LTRU Working Group" <ltru@ietf.org>, <apps-discuss@ietf.org>
References: <18971982.1399873468367.JavaMail.root@mswamui-cedar.atl.sa.earthlink.net> <9BE5D3F7FAEE4CAB8FD3326ED8F1ED75@PeterPC> <CAKHUCzyFAyLciHD0gzGM_5eaEqXdUFbyK8cJ_gVsQjmc+0fWEA@mail.gmail.com> <0C126A09-1909-449E-B0B4-9F41677710E2@tzi.org> <92A56D2F207E4A9893AEDBC13336FA28@PeterPC> <15955C4E122344DDBBAA53E803A8F08E@PeterPC> <CF9FB676.4A4AE%jhildebr@cisco.com>
In-Reply-To: <CF9FB676.4A4AE%jhildebr@cisco.com>
Date: Mon, 19 May 2014 18:35:06 -0400
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset="UTF-8"; reply-type=original
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
Importance: Normal
X-Mailer: Microsoft Windows Live Mail 16.4.3528.331
X-MimeOLE: Produced By Microsoft MimeOLE V16.4.3528.331
X-Antivirus: avast! (VPS 140519-1, 05/19/2014), Outbound message
X-Antivirus-Status: Clean
Archived-At: http://mailarchive.ietf.org/arch/msg/ltru/kHVgkTfZ9RZsvxBBByM5msthgUE
Subject: Re: [Ltru] [apps-discuss] Defining a CBOR tag for RFC 5646Language Tags
X-BeenThere: ltru@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Language Tag Registry Update working group discussion list <ltru.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ltru>, <mailto:ltru-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/ltru/>
List-Post: <mailto:ltru@ietf.org>
List-Help: <mailto:ltru-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ltru>, <mailto:ltru-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 19 May 2014 22:35:16 -0000

As I recall, that is similar to the approach taken by JSON-LD when mapping 
the same text in different languages (there it's called a "language map").

However, one problem that I see is that this requires case-insensitive 
comparison of
keys: if a decoder encounters a language map with two keys that differ only 
in case (for example, "en" and "EN"), which one should it use?  The one 
defined earlier or later?  While there are already CBOR tags in the registry 
that depend on such ordering (such as string references and shared 
references), I believe that defining further tags that depend on this kind 
of ordering of values in the CBOR stream should be avoided as much as 
possible.  Another approach may be to forbid such an ambiguous language map 
or ignore ambiguous keys, but I don't know which is the best approach.

Issues like those should be dealt with in another tag proposal; I don't mind 
if tag 38 (this proposal) is changed to use language maps, but additional 
discussion would have to be necessary.  Until then, the simple 
language-tagged string is enough.

--Peter

-----Original Message----- 
From: Joe Hildebrand (jhildebr)
Sent: Monday, May 19, 2014 3:25 PM
To: Peter Occil ; LTRU Working Group ; apps-discuss@ietf.org
Subject: Re: [apps-discuss] [Ltru] Defining a CBOR tag for RFC 5646Language 
Tags

Hm.  I was thinking:

{ "en": "Hello", "fr": "Bonjour" }

for the case of alternatives.  The wire size between

[ "en": "Hello" ] and { "en": "Hello" }

is zero; perhaps we could kill two birds with one stone?

On 5/15/14, 10:35 AM, "Peter Occil" <poccil14@gmail.com> wrote:

>I have updated my specification on language-tagged strings.
>
>http://peteroupc.github.io/CBOR/langtags.html
>
>The two things new are:
>
>- The "NOTE" section.
>- The sentence "Both the language tag and the arbitrary string can
>optionally be annotated with CBOR tags."
>
>--Peter
>
>_______________________________________________
>apps-discuss mailing list
>apps-discuss@ietf.org
>https://www.ietf.org/mailman/listinfo/apps-discuss
>


-- 
Joe Hildebrand