Subject: RE: [Ltru] Tag perversity text revised... (#944)

From: "Addison Phillips" <[email-masked]>
Date: Tue, 7 Jun 2005 13:27:10 -0700

How about:

<t>Applications or protocols that must truncate a tag SHOULD do so
by progressively removing subtags along with their preceding "-" from the right side of the language tag until the tag is short enough for the given buffer. If the resulting tag ends with a single-character subtag, that subtag and its preceding "-" MUST also be removed. For example, when shortening the subtag sequence "en-a-abc-x-private1-private2", the first truncation produces "en-a-abc-x-private1" and the second truncation produces "en-a-abc".</t>

Addison P. Phillips
Globalization Architect, Quest Software
Chair, W3C Internationalization Core Working Group

Internationalization is not a feature.
It is an architecture. 

> -----Original Message-----
> From: Mark Davis [mailto:[email-masked]]
> Sent: 2005年6月7日 13:10
> To: John.Cowan; Addison Phillips
> Cc: LTRU Working Group
> Subject: Re: [Ltru] Tag perversity text revised... (#944)
> 
> 
> 
> ‎Mark
> 
> ----- Original Message -----
> From: "John.Cowan" <[email-masked]>
> To: "Addison Phillips" <[email-masked]>
> Cc: "LTRU Working Group" <[email-masked]>
> Sent: Tuesday, June 07, 2005 11:55
> Subject: Re: [Ltru] Tag perversity text revised... (#944)
> 
> 
> > Addison Phillips scripsit:
> >
> > > http://www.inter-locale.com/ID/draft-ietf-ltru-registry-04a.html
> > > http://www.inter-locale.com/ID/draft-ietf-ltru-registry-04a.txt
> >
> > Note that these, unlike the copy below, still contain the typo
> "requries".
> >
> > >   - 33 (in this text): longest 3066ter generative
> >
> > I propose that all implementations that limit the length of language
> tags
> > MUST support at least 33-character tags.  Saying SHOULD is too weak: it
> > allows silly 2-character or 5-character limits to still claim
> conformance.
> 
> I am happy with a should of 63. I'm unhappy with a MUST of 33, since that
> may not be backwards compatible.
> 
> >
> > >    Since language tags longer than 33 characters may be truncated by
> an
> > >    application or protocol that limit tag sizes, when choosing
> language
> > >    tags users and applications SHOULD avoid adding subtags that add no
> > >    distinguishing value and SHOULD follow fields in the registry (such
> > >    as Prefix and Suppress-Script) that limit subtag composition.  See
> > >    Choice of Language Tag.
> >
> > The whole point of Prefix and Suppress-Script is to avoid the creation
> of
> > problematic tags.  I'd like the second SHOULD here to be MUST.
> 
> I strongly disagree. As discussed many times, there are legitimate cases
> where an application may reasonably need to have the script in queries
> even
> if  Suppress-Script is present. A SHOULD is what we have now, and that
> should remain.
> 
> >
> > >    Applications or protocols that must truncate a tag should first
> > >    remove all extension subtags.  If the tag is still too long, the
> tag
> > >    should then be truncated by progressively removing subtags from the
> > >    right of the tag.  Note that private use subtags are removed first.
> > >    When removing private use subtags, the singleton '-x-' should be
> > >    removed along with the last remaining private use subtag.
> >
> > This is confusingly non-iconic.  I propose this text:
> >
> >      Applications or protocols that must truncate a tag should first
> >      remove all private use subtags including the '-x-'.  If the tag is
> >      still too long, the tag should then be truncated by progressively
> >      removing extension subtags including the singleton from the right
> >      of the tag.
> 
> While this is better, it still unnecessarily distinguishes between private
> use and extensions. If it is ok to truncate
> 
> en-US-a-abcdefg-abcdefg
> to
> en-US-a-abcdefg
> 
> then it makes just as much sense to truncate
> 
> en-US-x-abcdefg-abcdefg
> to
> en-US-x-abcdefg
> 
> There is no reason for the x subtags to be all or nothing, and the
> extension
> subtags not to be.
> 
> All of the trunctation discussion can be much simplified by saying:
> 
> When truncation to a specific length is required:
> 1. If the tag doesn't fit, remove the rightmost subtag and immediately
> preceeding '-'
> 2. Repeat #1 until it does fit.
> 3. If the rightmost subtag is a singleton, remove it and the preceeding '-
> '.
> 
> There is actually no need to do any analysis of what subtag means what in
> truncation; and the simpler it is, the easier it is for people to get it
> right.
> 
> (In practice, of course, it is even simpler, since any legit truncation
> point is followed by a '-', and preceeded by two letters. Here is some
> quick&dirty code:
>  static String truncateValidLanguageTag(String tag, int limit) {
>   if (tag.length() <= limit) return tag;
>   do {
>    if (tag.charAt(limit) == '-' && tag.charAt(limit-1) != '-' &&
> tag.charAt(limit-2) != '-') break;
>   } while (--limit > 2);
>   return tag.substring(0,limit);
>  }
> )
> 
> >
> > If the hard lower limit of 33 is accepted, no further truncation will be
> > required.  Otherwise, add:
> >
> >      If the tag is still too long, the tag should then be truncated by
> >      progressively removing variant, region, and script subtags from
> >      the right of the tag.
> >
> > >    Note: The longest tag that might be generated based on the
> > >    grandfathered tags (see Section 2.2.8) that contain subtags not
> > >    otherwise defined by this document (and in a form that could be
> > >    registered as a variant) requires 20 characters (an example of this
> > >    tag might be "cel-Latn-155-gaulish").
> >
> > I think this graf should be deleted, as it's productive of nothing but
> confusion.
> > 'gaulish' is not a plausible candidate for registration as a variant.
> 
> I agree; we should nuke this note.
> 
> >
> > >    The longest possible tags, excluding extensions, that might have
> some
> > >    marginal utility could have a length of up to 62 characters, as
> shown
> > >    below.  The longest such tag without private use subtags requires
> 42
> > >    characters.
> > >
> > >    Here is how the 62-character length of the longest practical tag
> > >    (excluding extensions) is derived:
> > >
> > >    language      = 3
> > >    extlang1      = 4 (each subsequent subtag includes '-')
> > >    extlang2      = 4 (unlikely: needs prefix="language-extlang1")
> > >    extlang3      = 4 (extremely unlikely)
> > >    script        = 5 (must not be suppressed)
> > >    region        = 4 (UN M.49; ISO 3166 requires 3)
> > >    variant1      = 9
> > >    variant2      = 9 (unlikely: needs prefix="language-variant1")
> > >    private use 1 = 11 ("-x-" + subtag)
> > >    private use 2 = 9
> > >    total         = 62 characters
> > >
> > >                   Figure 3: Derivation of the Longest Tag
> >
> > I'd leave this out altogether.
> Agree here also.
> 
> >
> > --
> > John Cowan <[email-masked]>     http://www.reutershealth.com
> > I amar prestar aen, han mathon ne nen,    http://www.ccil.org/~cowan
> > han mathon ne chae, a han noston ne 'wilith.  --Galadriel, LOTR:FOTR
> >
> > _______________________________________________
> > Ltru mailing list
> > [email-masked]
> > https://www1.ietf.org/mailman/listinfo/ltru
> >
> >
> 

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

---

From: "Randy Presuhn" <[email-masked]>
Date: Tue, 7 Jun 2005 13:42:57 -0700

Hi -

> From: "Addison Phillips" <[email-masked]>
> To: "Mark Davis" <[email-masked]>; "John.Cowan" <[email-masked]>
> Sent: Tuesday, June 07, 2005 1:27 PM
> Subject: RE: [Ltru] Tag perversity text revised... (#944)
>
> How about:
>
> by progressively removing subtags along with their preceding "-" from the right side of the language tag until the tag is short
enough for the given buffer. If the resulting tag ends with a single-character subtag, that subtag and its preceding "-" MUST also
be removed. For example, when shortening the subtag sequence "en-a-abc-x-private1-private2", the first truncation produces
"en-a-abc-x-private1" and the second truncation produces "en-a-abc".</t>
...

Replace "must truncate a tag SHOULD"
with "truncate a tag MUST" and this
technical contributor would be much happier.

Randy