Fixed
Details
Details
Assignee
Markus Scherer
Markus SchererReporter
Markus Scherer
Markus SchererComponents
Labels
Priority
Time Needed
Hours
Fix versions
Created June 28, 2018 at 5:21 PM
Updated October 3, 2018 at 10:54 PM
Resolved July 1, 2018 at 8:44 PM
As far as I can tell, Collator::getLocale(actual/valid) never includes any collation keyword because it is populated from ures_getLocaleByType() from the resource bundle that contains the data. (Need to write a test case, but I don't see any code that sets the keyword.)
That is, `Collator::createInstance(de@collation=phonebook).getLocale(actual or valid)` returns "de" even though you get different collators for "de" vs. "de@collation=phonebook".
It seems like for getLocale() to make sense we would want the collation type included unless it is the default type. That is, I would probably continue to suppress the collation keyword for de@collation=standard and zh@collation=pinyin etc.
Note that getLocale() is still marked as "@deprecated ICU 2.8 This API is under consideration for revision in ICU 3.0" because we have never settled on how to make it work, and make it useful.
Note also: When we start supporting other keywords like "alternate=shifted", I would continue to omit those from getLocale() because they do not affect the tailoring that is loaded, they only override settings (which can be reverted after loading).