Subject: [Ltru] 4.4.1: limited buffer sizes

From: Peter Constable <[email-masked]>
Date: Tue, 8 Jul 2008 16:45:25 -0700

The current draft has this in 4.4.1:

-------------
Protocols or specifications that specify limited buffer sizes for language tags MUST allow for language tags of up to 33 characters.

Protocols or specifications that specify limited buffer sizes for language tags SHOULD allow for language tags of at least 30 characters. Note that RFC 4646 (Phillips, A. and M. Davis, "Tags for Identifying Languages," September 2006.) [RFC4646] recommended a field size of 42 character because...
-------------

So, if 33 is required, what's the point of recommending at least 30?

Also, note this typo: "42 character" s/ "42 characters".

Peter
_______________________________________________
Ltru mailing list
[email-masked]
https://www.ietf.org/mailman/listinfo/ltru

---

From: "Phillips, Addison" <[email-masked]>
Date: Tue, 8 Jul 2008 21:43:01 -0700

Well they're both wrong. The actual number is 34. The text has been modified to read:

<t>The considerations for assigning a buffer limit are:<list>

<t>Implementations SHOULD NOT truncate language tags unless the meaning of the tag is purposefully being changed, or unless the tag does not fit into a limited buffer size specified by a protocol for storage or transmission.</t>

<t>Implementations SHOULD warn the user when a tag is truncated since truncation changes the semantic meaning of the tag.</t>

<t>Implementations of protocols or specifications that are space constrained but do not have a fixed limit SHOULD use the longest possible tag in preference to truncation.</t>

<t>Protocols or specifications that specify limited buffer sizes for language tags MUST allow for language tags of up to 34 characters.</t>

<t>Protocols or specifications that specify limited buffer sizes for language tags SHOULD allow for language tags of at least
34 characters. Note that <xref target="RFC4646">RFC 4646</xref> recommended a field size of 42 characters because it included all three elements of the 'extlang' production. Two of these are now permanently reserved. The current size recommendation does not include the use of the 'extlang' field. Protocols or specifications that commonly use extensions or private use subtags might wish to reserve or recommend a longer "minimum buffer" size.</t>

</list>
</t>

<t>The following illustration shows how the 30-character recommendation was derived:</t>

<figure title="Derivation of the Limit on Tag Length" anchor="longtag42">
<artwork>
language      =  3 (ISO 639-2; ISO 639-1 requires 2)
extlang       =  4 (selected ISO 639-3 codes)
script        =  5 (if not suppressed: see Section 4.1)
region        =  4 (UN M.49; ISO 3166-1 requires 3)
variant1      =  9 (needs 'language' as a prefix)
variant2      =  9 (needs 'language-variant1' as a prefix)

total         = 34 characters
</artwork>
</figure>

Addison Phillips
Globalization Architect -- Lab126

Internationalization is not a feature.
It is an architecture.

> -----Original Message-----
> From: [email-masked] [mailto:[email-masked]] On
> Behalf Of Peter Constable
> Sent: Tuesday, July 08, 2008 4:45 PM
> To: LTRU Working Group
> Subject: [Ltru] 4.4.1: limited buffer sizes
>
> Protocols or specifications that specify limited buffer sizes for
> language tags MUST allow for language tags of up to 33 characters.
>
> Protocols or specifications that specify limited buffer sizes for
> language tags SHOULD allow for language tags of at least 30
> characters. Note that RFC 4646 (Phillips, A. and M. Davis, "Tags
> for Identifying Languages," September 2006.) [RFC4646] recommended
> a field size of 42 character because...
> -------------
>

---

From: Peter Constable <[email-masked]>
Date: Tue, 8 Jul 2008 21:53:36 -0700

> From: Phillips, Addison [mailto:[email-masked]]

> Well they're both wrong. The actual number is 34.

I suspected such a number.

> The text has been modified to read:

...
> <t>Protocols or specifications that specify limited buffer sizes for
> language tags MUST allow for language tags of up to 34 characters.</t>
>
> <t>Protocols or specifications that specify limited buffer sizes for
> language tags SHOULD allow for language tags of at least
> 34 characters.

The latter statement seems pointless in light of the former: the former makes the latter mandatory. (That was part of my concern earlier; I should have stated that explicitly.)

Peter

---

From: "Phillips, Addison" <[email-masked]>
Date: Tue, 8 Jul 2008 22:36:51 -0700

Another artifact. The original requirement was:

- MUST allow 33
- SHOULD allow 42

The smaller limit was because extlangs weren't actually permitted... however... a close examination of the text in 4646 reveals that 34 is ALSO not the number. That's because a registered primary language subtag is now longer than a language-extlang sequence. Hence:

<t>Protocols or specifications that specify limited buffer sizes for language tags MUST allow for language tags of at least
35 characters. Note that <xref target="RFC4646">RFC 4646</xref> recommended a field size of 42 characters because it included all three elements of the 'extlang' production. Two of these are now permanently reserved, so a registered primary language subtag of the maximum length of eight characters is now longer than the longest language-extlang combintation. Protocols or specifications that commonly use extensions or private use subtags might wish to reserve or recommend a longer "minimum buffer" size.</t>

And the art:

language      =  8 (longest registered value)

total         = 35 characters

Addison Phillips

> From: Peter Constable [mailto:[email-masked]]
> Sent: Tuesday, July 08, 2008 9:54 PM
> To: Phillips, Addison; LTRU Working Group
> Subject: RE: 4.4.1: limited buffer sizes
>
> The latter statement seems pointless in light of the former: the
> former makes the latter mandatory. (That was part of my concern
> earlier; I should have stated that explicitly.)
>
>
>
> Peter

---

From: Peter Constable <[email-masked]>
Date: Tue, 8 Jul 2008 23:14:11 -0700

> Hence:
> language tags MUST allow for language tags of at least
> 35 characters. Note that <xref target="RFC4646">RFC 4646</xref>
> recommended a field size of 42 characters...

Small suggested revision: "...recommended a minimum field size of 42 characters..."

Peter

---

From: "Phillips, Addison" <[email-masked]>
Date: Fri, 11 Jul 2008 10:19:09 -0700

(editor hat)

DONE.

Addison Phillips

> Sent: Tuesday, July 08, 2008 11:14 PM