[loc-en-dev] A bug was filed - toLanguageTag problem
Yoshito Umaoka
y.umaoka at gmail.com
Thu Jan 27 18:35:09 PST 2011
I submitted a bug - 7015500
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7015500
<http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7015500>
It should take a while the bug is showing up in the above link.
-Yoshito
-------- Original Message --------
Subject: toLanguageTag problem
Date: Wed, 26 Jan 2011 16:08:05 -0500
From: Yoshito Umaoka <y.umaoka at gmail.com>
To: locale-enhancement-dev at openjdk.java.net
Hi all,
I found a problem in Locale#toLanguageTag(). When an instance of Locale
has no language, toLanguageTag() supplies "und" as the language subtag.
This is a requirement of "langtag" construction of BCP47 language tag.
langtag = language
["-" script]
["-" region]
*("-" variant)
*("-" extension)
["-" privateuse]
However, it is not necessary if the Locale only has private use value.
Because a BCP47 language tag could be private use alone.
Language-Tag = langtag ; normal language tags
/ privateuse ; private use tag
/ grandfathered ; grandfathered tags
For example,
Locale.forLanguageTag("x-elmer").toLanguageTag()
Above currently returns "und-x-elmer", but it should actually return
"x-elmer". I'm going to file a bug for this issue.
-Yoshito
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/locale-enhancement-dev/attachments/20110127/1ac5a8a6/attachment.html
More information about the locale-enhancement-dev
mailing list