RFC 6067

BCP 47 Extension U

πŸ“… published December 2010, from ietf

RFC 6067: BCP 47 Extension U πŸ¦‹

Okay bestie, this is RFC 6067, and it's called "BCP 47 Extension U" πŸ’– It comes from the Internet Engineering Task Force (IETF) and is dated December 2010. The authors are M. Davis (Google), A. Phillips (Lab126), and Y. Umaoka (IBM) 🫢 The category is Informational, so it's published for information, not as a standards track spec πŸ“ The ISSN is 2070-1721 ✨ and the title block doesn't list any RFCs it obsoletes or updates 🌸

Abstract ✨

So the whole point of this doc is to specify an Extension to BCP 47 🧚 It adds subtags that handle language and/or locale-based behavior, or refinements to language tags, based on work done by the Unicode Consortium πŸ’…


Status of This Memo πŸ“œ

Okay so this one is not an Internet Standards Track spec. It's published for informational purposes πŸ’œ

It's a product of the IETF, which means it represents the consensus of the IETF community 🫢 It got public review and was approved for publication by the Internet Engineering Steering Group (IESG) ✨ Not every doc the IESG approves is a candidate for any level of Internet Standard, so check out Section 2 of RFC 5741 if you want the deets πŸ™ˆ

Want the current status, any errata, or a way to give feedback? Head to http://www.rfc-editor.org/info/rfc6067 πŸ¦‹

Copyright (c) 2010 IETF Trust and the persons identified as the document authors. All rights reserved 🌈

This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info), as in effect on the date of publication. Please review those docs carefully, since they describe your rights and restrictions with respect to this document πŸ‘‘ Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions. They're provided without warranty, as described in the Simplified BSD License πŸŽ€

Table of Contents πŸ—‚οΈ

1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . . . 2
  1.1.  Requirements Language . . . . . . . . . . . . . . . . . . . 2
2.  BCP 47 Required Information . . . . . . . . . . . . . . . . . . 2
  2.1.  Summary . . . . . . . . . . . . . . . . . . . . . . . . . . 4
    2.1.1.  Canonicalization  . . . . . . . . . . . . . . . . . . . 5
  2.2.  Registration Form . . . . . . . . . . . . . . . . . . . . . 6
3.  Acknowledgements  . . . . . . . . . . . . . . . . . . . . . . . 6
4.  IANA Considerations . . . . . . . . . . . . . . . . . . . . . . 6
5.  Security Considerations . . . . . . . . . . . . . . . . . . . . 7
6.  References  . . . . . . . . . . . . . . . . . . . . . . . . . . 7
  6.1.  Normative References  . . . . . . . . . . . . . . . . . . . 7
  6.2.  Informative References  . . . . . . . . . . . . . . . . . . 7

1. Introduction 🧚

Okay so [BCP47] lets people define and register language tag extensions "that contain a language component and are compatible with applications that understand language tags" πŸ’– This doc defines an extension for identifying Unicode locale-based variations using language tags 🌸 The "singleton" identifier for this extension is u ✨

1.1. Requirements Language πŸŽ€

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 [RFC2119] 🫢

2. BCP 47 Required Information 🌈

Language tags, as defined by [BCP47], are super useful for identifying the language of content πŸ’… They're also used as locale identifiers (or can be mapped to locales) in lots of operating environments and APIs πŸ¦‹ But here's the thing: many locale identifiers also need extra "tailorings" or options for specific values within a language, culture, region, or other variation πŸ‘‘ This extension gives you a mechanism for using those extra tailorings inside language tags for general interchange πŸ’œ

The Unicode Consortium defines a standardized, structured set of locale data, plus identifiers for that locale data, in the "Common Locale Data Repository" or "CLDR" πŸ“ The maintaining authority for the extension in this doc is the Unicode Consortium, and here's the info:

+---------------+---------------------------------------------------+
| Item          | Value                                             |
+---------------+---------------------------------------------------+
| Name          | Unicode Consortium                                |
| Contact Email | cldr-contact@unicode.org                          |
| Discussion    | cldr-users@unicode.org                            |
| List Email    |                                                   |
| URL Location  | cldr.unicode.org                                  |
| Specification | Unicode Technical Standard #35 Unicode Locale     |
|               | Data Markup Language (LDML),                      |
|               | http://unicode.org/reports/tr35/                  |
| Section       | Section 3 Unicode Language and Locale Identifiers |
+---------------+---------------------------------------------------+

The specification of extension subtags is in Section 3, Key Type Definitions, of Unicode Technical Standard #35: Unicode Locale Data Markup Language [UTS35] 🧚 As BCP 47 requires, subtags follow the language tag ABNF and the other rules for forming language tags and subtags πŸ’… They're restricted to ASCII letters and digits, they're not case sensitive, and they don't go over eight characters in length ✨ Also, any "well-formed" language tag (see RFC 5646, Section 2.2.9 [BCP47]) is a well-formed locale identifier too πŸ¦‹

LDML [UTS35] specifies a canonical representation 🫢 It's available over the Internet at no cost, and there's a royalty-free license at http://unicode.org/copyright.html 🌸 LDML is versioned, and every version is numbered, dated, and stable πŸ’– Extension subtags, once LDML defines them, are never retracted and never change in meaning in a substantial way πŸ‘‘

The structure of the Unicode locale extension is decided by the Unicode CLDR Technical Committee, following the policies and procedures at http://www.unicode.org/consortium/tc-procedures.html. It's also subject to the Unicode Consortium Policies at http://www.unicode.org/policies/policies.html πŸ“

Here's what successive versions of LDML [UTS35] can do from the Unicode Consortium without needing a new RFC 🌈 They can allocate new attributes, keywords, and types, make clarifications or non-material changes to an existing attribute, keyword, or type, and make compatible extensions to the overall syntactic structure of attributes, keywords, and types πŸ’… A new RFC would be required for material changes to an existing attribute, keyword, or type, or for an incompatible change to the overall syntactic structure of attributes, keywords, and types πŸ™ˆ But honestly, that kind of change would go against the policies of the Unicode Consortium, so it's not anticipated πŸ”₯

2.1. Summary ✨

The subtags you can use in the u extension are made up of a set of attributes, keys, and types πŸ¦‹ Their definitions and meanings live in Section 3 (Unicode Language and Locale Identifiers) of [UTS35], and here's the quick version:

  • An 'attribute' is a subtag that's three to eight characters long, comes right after the singleton, and comes before any 'keyword' sequences πŸ’– No attributes had been defined when this doc was published 🌸
  • A 'keyword' is a sequence of subtags made of a 'key' subtag, followed by zero or more 'type' subtags. So a 'key' can show up all alone without a 'type' subtag 🫢 A 'key' MUST NOT appear more than once in a language tag's extension string πŸ™ˆ The order of the 'type' subtags inside a 'keyword' is sometimes significant to how they get interpreted 🧚
    • A. A 'key' is a subtag that's exactly two characters long. Each 'key' is followed by zero or more 'type' subtags πŸ’…
    • B. A 'type' is a subtag that's three to eight characters long and follows a 'key' ✨ 'Type' subtags are specific to a particular 'key', and the order of the 'type' subtags MAY be significant to how the 'keyword' gets interpreted 🌈

For example, the language tag de-DE-u-attr-co-phonebk breaks down like this πŸ“

  • The base language tag de-DE (German as used in Germany), exactly as defined by [BCP47], using subtags from the IANA Language Subtag Registry πŸ‡©πŸ‡ͺ
  • The singleton u, which identifies this extension πŸ’œ
  • The attribute attr, which is just an example for illustration (no attributes were defined when this doc was published) πŸ™ˆ
  • The keyword co-phonebk, made up of the key co (Collation) and the type phonebk (Phonebook collation order) πŸ‘‘

Only the first occurrence of an attribute or key actually means anything in a language tag πŸ’– When you're interpreting tags that have the Unicode locale extension, duplicates get ignored like this: ignore any attribute that has already shown up in the tag, and ignore any keyword whose key has already shown up in the tag 🫢

Successive versions of [UTS35] could define more attributes, keys, and types πŸ¦‹ But once something is defined, attributes, keys, and types are never removed 🌸

Starting with CLDR version 1.7.2, machine-readable files are available that list the valid attributes, keys, and types for each successive version of [UTS35] ✨ Those releases are listed at http://cldr.unicode.org/index/downloads. Each release has a data directory of the form http://unicode.org/Public/cldr/<version>, where <version> gets replaced by the release number πŸ’… For example, for version 1.7.2, the core.zip file lives at http://unicode.org/Public/cldr/1.7.2/core.zip 🌈 Inside core.zip, the path common/bcp47 holds the data files that define the valid attributes, keys, and types πŸ“ The most recent version is always identified as "latest" and can be accessed by the URL in Section 2.2 πŸ‘‘

To get the version info in XML when you're working with the data files, the XML parser must be validating πŸ™ˆ When you unzip core.zip, the dtd directory will sit at the same level as the bcp47 directory, and this is required for correct validation πŸ”₯ For each release after CLDR 1.8, types introduced in that release are also marked in the data files with the XML attribute "since", like in this example 🫢

<type name="adp" since="1.9"/>

The data is also kept in a source code repository, with each release tagged, so you can look at it directly without unzipping 🧚 For example, check out πŸ’–

Some data in the CLDR data files might need you to reference LDML [UTS35] 🌸 For the specifics, see Appendix Q in that document πŸ’… For example, LDML reserves the type codepoints to define specific code point ranges in Unicode for specific purposes πŸ¦‹

2.1.1. Canonicalization

okay so bestie, [BCP47] says upper vs lowercase letters don't matter in the subtags here 🫢 The canonical form is all lowercase, no exceptions. ✨ Attributes go in [US-ASCII] order (numbers come before letters, and letters are sorted as lowercase US-ASCII code points) πŸ”’ Keywords also go in [US-ASCII] order by key. πŸ’…

Here's the lowkey important part πŸ‘€ The order of subtags inside a keyword is significant. Rearranging them changes what the extension means, so the canonical form NEVER reorders the subtags within a keyword. It's giving "don't touch my order" πŸ™…β€β™€οΈπŸŽ€

2.2. Registration Form

Per RFC 5646, Section 3.7 [BCP47]:

%%
Identifier: u
Description: Unicode Locale
Comments: Subtags for the identification of language and cultural
   variations.  Used to set behavior in locale APIs.  Data is
   located in the "common/bcp47" directory inside the referenced
   URL.  Unicode Technical Standard #35 (LDML) provides additional
   reference material defining the keys and values.
   For more details please see
   <http://cldr.unicode.org/index/bcp47-extension>.
Added: 2010-09-02
RFC: RFC 6067
Authority:     Unicode Consortium
Contact_Email: cldr-contact@unicode.org
Mailing_List:  cldr-users@unicode.org
URL: http://www.unicode.org/Public/cldr/latest/core.zip
%%

3. Acknowledgements πŸ™Œ

Huge thanks to John Emmons and the rest of the Unicode CLDR Technical Committee for their work developing the BCP 47 subtags for LDML. 🌈

Also a big ✨thank you✨ to Doug Ewell, who suggested SO many improvements to this document. He's a legend. πŸ‘‘

4. IANA Considerations πŸ“‹

So according to this document, IANA has put the record from Section 2.2 into the Language Extensions Registry πŸ—‚οΈ That follows Section 3.7 (Extensions and the Extensions Registry) of [BCP47], "Tags for Identifying Languages". Per Section 5.2 of [BCP47], the Unicode Consortium (the "Authority" on the record) might occasionally, like rarely, ask for maintenance of this record. πŸ₯Ή

Changes that can go to IANA without publishing a brand new RFC are limited to the Comments, Contact_Email, Mailing_List, and URL fields. Those changes MUST use the domain 'unicode.org' in any new addresses or URIs. They MUST explicitly cite this document, so IANA can reference these requirements. And they MUST originate from the 'unicode.org' domain. πŸ”’ The domain or authority can only be changed via a new RFC, so don't even try πŸ’€

5. Security Considerations πŸ”

The security considerations for this extension are the same as the ones for [BCP47]. Go read RFC 5646, Section 6, Security Considerations [BCP47] for the full tea β˜• Nothing extra here, but it's still serious business, periodt. πŸ’œ

6. References πŸ“š

6.1. Normative References

[BCP47]          Phillips, A., Ed. and M. Davis, Ed., "Tags for
                 Identifying Languages", BCP 47, RFC 5646,
                 September 2009.

[RFC2119]        Bradner, S., "Key words for use in RFCs to Indicate
                 Requirement Levels", BCP 14, RFC 2119, March 1997.

[US-ASCII]       International Organization for Standardization,
                 "ISO/IEC 646:1991, Information technology -- ISO
                 7-bit coded character set for information
                 interchange.", 1991.

[UTS35]          Davis, M., "Unicode Technical Standard #35: Locale
                 Data Markup Language (LDML)", December 2007,
                 <http://www.unicode.org/reports/tr35/>.

                 Section 3: http://unicode.org/reports/
                 tr35/#Unicode_Language_and_Locale_Identifiers

                 Appendix Q: http://unicode.org/reports/
                 tr35/#Locale_Extension_Key_and_Type_Data

6.2. Informative References

[ldml-registry]  "Registry for Common Locale Data Repository tag
                 elements", September 2009.

Authors' Addresses πŸ’Œ

Mark Davis
Google

EMail: mark@macchiato.com


Addison Phillips
Lab126

EMail: addison@lab126.com


Yoshito Umaoka
IBM

EMail: yoshito_umaoka@us.ibm.com

That's the whole tea, bestie! πŸ¦‹βœ¨

πŸ“¦ where this page comes from