[loc-en-dev] Locale RFE

Yoshito Umaoka y.umaoka at gmail.com
Mon Sep 14 00:49:21 PDT 2009


Hi folks,

After the conference call last week and some additional sub discussions 
with Mark, Doug and Steven, I update the API specification.  I'm 
attaching the latest proposal (API doc) in this message.

Since the last revision, followings were updated.

- toString() to include script/extensions after variant prefixed by 
"#".  For example, "en_US_#Latn", "th_TH_TH_#nu-thai", etc.
- toLanguageTag() to preserve variant which does not conform the BCP 47 
syntax using private use with special subtag "jvariant".  For example, 
Locale en_US_WIN will be transformed to a language tag 
"en-US-x-jvariant-WIN".
- Builder to check variant syntax to be conformed to the BCP 47 variant 
by default.  Another Builder constructor - Builder(boolean 
isLenientVariant) allows people who want to use any arbitrary variants.  
With isLenientVariant true, Buidler#setVariant will skip all syntax 
checks and never normalize the input value to lowercase letters.
- The class description to refer the Unicode language and locale 
identifiers as the reference design of java.util.Locale
- Clarify Locale and its methods won't check validity of each subtag 
values - only checks syntactical restrictions in Builder to support 
"well-formedness".

Last week, we revisited toString() issues.  Mark, Doug and myself really 
want to see all internal fields written by toString().  The proposal 
above should not break any practical code parsing toString() values 
(recognized as a segment of variant and usually discarded while 
processing).  But if this is not really acceptable, we could give up 
this change and back up some explanation about this in the previous 
revision.

Please take your time to review this revision and provide your comments 
by the end of Tuesday September 15.

I could not finish some necessary changes in ResouceBundle / 
LocaleServiceProvider class (no API changes, but the description should 
be updated.  I'm still struggling to select proper wording...)  I'll 
provide this part by Tuesday morning.

BTW, the new language tag RFC got the number assigned - 
http://www.rfc-editor.org/rfc/rfc5646.txt

-Yoshito
-------------- next part --------------
A non-text attachment was scrubbed...
Name: LocaleAPI0914.zip
Type: application/x-zip-compressed
Size: 25331 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/locale-enhancement-dev/attachments/20090914/023b3ffe/attachment-0001.bin 


More information about the locale-enhancement-dev mailing list