Project Proposal: java.util.Locale enhancement

Doug Felt dougfelt at google.com
Mon Sep 29 11:31:07 PDT 2008


I hereby propose an openjdk project "Java Locale Enhancement".

This proposal [1] enhances java.util.Locale in order to bring Java into
conformance with IETF BCP47 [2] and UTR35(CLDR/LDML) [3].

The internal structure for Locale was modeled after IETF RFC 1766 [4], which
in 1995 was the industry standard for the representation of languages and
locales (and required by HTML, XML, and many other specifications and
programs).

RFC 1766 has been superseded by IETF BCP 47, which makes a number of
additions needed for the representation of languages. Script codes [5]
support required distinctions among languages that use different writing
systems (such as simplified vs traditional Chinese), with an optimal
hierarchical representation of locale data. 3-letter base language codes
(ISO 639 Part 2 & 3 [6, 7]) represent such languages as Filipino (fil) the
official language of the Philipines. BCP 47 also allows for regional
variants, like Latin American Spanish (es_419), using region identifiers
listed in the IANA subtag registry [8].

Locale's limitations are already causing significant practical problems. For
example, when a J2EE Servlet container implementation parses a language tag
from Accept Language and creates a Locale instance, it cannot map a script
code into the new Locale object without breaking its original structure,
because the use of script code and 3-letter language codes is not allowed by
the current Java Locale specification.

I propose this project be sponsored by the OpenJDK Internationalization
group. I volunteer to be moderator of the project.

Thank you.

Doug Felt

[1] http://docs.google.com/Doc?id=d3q3z35_14c2hhxmdw
[2] http://www.rfc-editor.org/rfc/bcp/bcp47.txt
[3] http://unicode.org/reports/tr35/
[4] http://www.ietf.org/rfc/rfc1766.txt
[5] http://unicode.org/iso15924/
[6] http://www.loc.gov/standards/iso639-2/php/English_list.php
[7] http://www.sil.org/iso639-3/default.asp
[8] http://www.iana.org/assignments/language-subtag-registry


More information about the announce mailing list