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

John Cowan <> Mon, 12 May 2014 05:37 UTC

Return-Path: <>
Received: from localhost ( []) by (Postfix) with ESMTP id 7DA1F1A03F7; Sun, 11 May 2014 22:37:14 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -3.251
X-Spam-Status: No, score=-3.251 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RP_MATCHES_RCVD=-0.651] autolearn=ham
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id zXRh6eZziOHc; Sun, 11 May 2014 22:37:12 -0700 (PDT)
Received: from ( []) by (Postfix) with ESMTP id 9320C1A02C7; Sun, 11 May 2014 22:37:11 -0700 (PDT)
Received: from cowan by with local (Exim 4.72) (envelope-from <>) id 1Wjiv9-0004qd-Hg; Mon, 12 May 2014 01:37:03 -0400
Date: Mon, 12 May 2014 01:37:03 -0400
From: John Cowan <>
To: Ira McDonald <>
Message-ID: <>
References: <> <>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <>
User-Agent: Mutt/1.5.20 (2009-06-14)
Sender: John Cowan <>
Cc: Peter Occil <>, Carsten Bormann <>, LTRU Working Group <>,
Subject: Re: [Ltru] Fwd: [apps-discuss] Defining a CBOR tag for RFC 5646 Language Tags
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Language Tag Registry Update working group discussion list <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Mon, 12 May 2014 05:37:14 -0000

Carsten Bormann scripsit:

> The proposal is almost trivially obvious (pair a language tag with an
> UTF-8 string in a two-element array) and looks right to me.  But I'm
> not an expert in Language Tags, and silly mistakes are being made by
> non-experts all the time.

Looks good to me.  But I would recommend requiring the encoder to do the
case folding rather than leaving it to the decoder.  This is a form of
early uniform normalization, which is generally a Good Thing if you can
get it.

The main mistake people make is trying to make the language tag fixed
length, which you have already avoided.

John Cowan
A: "Spiro conjectures Ex-Lax."
Q: "What does Pat Nixon frost her cakes with?"
  --"Jeopardy" for generative semanticists