Support all collation-related keywords in Collator.getInstance()

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.)

Activity

UnicodeBot 
June 30, 2018 at 11:39 PM

Trac Comment 12 by —2014-05-23T22:43:14.621Z

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

Fixed

Details

Assignee

Reporter

Components

Labels

Priority

Time Needed

Days

Fix versions

Created June 28, 2018 at 5:17 PM
Updated October 3, 2018 at 10:58 PM
Resolved July 1, 2018 at 8:49 PM