Subject: [ANCP] Language tags for text fields

From: Tom Taylor <[email-masked]>
Date: Thu, 14 Apr 2011 18:51:35 -0400

One of the IESG comments when reviewing the base protocol spec was that 
text fields meant for human consumption need a language tag. To give you 
a concrete example, a UTF-8 blob of text in the China-Japan-Korea (CJK) 
range probably has to be tagged with a country code (zh for Chinese), 
possibly with an extended language subtag (zh-yue for Cantonese), and 
possibly with a script subtag. I'm no expert here, just trying to work 
up an example.

The main message is that language tags are encoded with characters in 
the US-ASCII range x00-FF (hence fit in UTF-8), and are of variable 
length. My proposal to meet the IESG requirement is this:

-- the leading characters of the text field consist of the language tag

-- the language tag is terminated by a suitable character, say ":"

-- the text itself follows

-- the length of the text field (bytes) is equal to the length of the 
language tag, plus 1 for the delimiter, plus the length of the text to 
be presented.

Any objections? This applies specifically to the diagnostic message in 
the Status-Info TLV.

Tom Taylor