Support all collation-related keywords in Collator.getInstance()
General
Trac Data
Other Data
General
Trac Data
Other Data
Description
support all collation-related keywords (Unicode locale attributes) in Collator.getInstance() (both Java & C)
Currently, Collator.getInstance() and its C/C++ equivalents only support the @collation=phonebook keyword. We should support all of the keywords in getInstance(), so that all attributes are settable without having to call the setter APIs. For example, this exposes more collation functionality in simple API wrappers. For example, we want to be able to set the strength, uppercase-first, numeric sorting (CODAN) and such directly in getInstance().
(This should take care of the collation part of ticket #7893.)
As of now, the Locale/ULocale constructors accept either locale IDs with '@' or language tags with "u", no need to do anything special.
Reject bad locale IDs: Illegal argument for bogus Locale object, unrecognized values, and a value not valid for the keyword (strength=shifted). Reject collation keywords that are not supported (variableTop).
Ignore keywords that are not known to be relevant for collation (calendar=buddhist).
UnicodeBot
June 30, 2018 at 11:39 PM
Trac Comment 8 by —2014-01-03T22:39:49.735Z
Review the code in CollPerf2Test::CollPerf2Test(), source:icu/trunk/source/test/perf/collperf2/collperf2.cpp
support all collation-related keywords (Unicode locale attributes) in Collator.getInstance() (both Java & C)
Currently, Collator.getInstance() and its C/C++ equivalents only support the @collation=phonebook keyword. We should support all of the keywords in getInstance(), so that all attributes are settable without having to call the setter APIs. For example, this exposes more collation functionality in simple API wrappers. For example, we want to be able to set the strength, uppercase-first, numeric sorting (CODAN) and such directly in getInstance().
(This should take care of the collation part of ticket #7893.)