RFC 6067
BCP 47 Extension U
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 Notice π
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 keyco(Collation) and the typephonebk(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 π
http://unicode.org/repos/cldr/tags/release-1-7-2/common/bcp47/http://unicode.org/repos/cldr/tags/release-1-8/common/bcp47/
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
- ietf: rfc6067 2010-12
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms