- Added code to use the parentLocales data in supplementalData.xml to determine the "parent locale ID" to use when
the requested resource bundle is not present (ICU-21126).
- Added code to change the parent-chain search path to handle the script better (ICU-21125; algorithm was described
in CLDR-15265):
- The base search patch is now ll_Ssss_RR -> ll_RR -> ll_Ssss -> ll -> root
- If the requested script is not the default script for the requested language and region, we automatically
avoid fallbacks that will implicitly change the script.
- Added new code to the CLDR-to-ICU data generation tool to generate source code, and used it to generate the lookup
tables for the new resource-fallback logic (we can't use the existing resource files for this, since that would
involve opening a resource bundle while trying to open another resource bundle). The data-generation stuff is
intended to be generic enough to allow for us to generate more static data tables in the future.
- Commented out a few collator tests, and changed one resource bundle test, because they're incompatible with the
new fallback logic (specifically, the default-script logic).
This is the normal standard way in C, C++ as well as Java and there's no
longer any reason for ICU to be different. The various internal macros
providing custom boolean constants can all be deleted and code as well
as documentation can be updated to use lowercase true/false everywhere.
Removed logKnownIssue(ICU-21322) in plurults.cpp, ICU-21322 is done and the
entire if-statement was commented out.
Replaced CLDR-13700 with CLDR-13701 in several TODOs. 13700 is a duplicate of
13701.
Likewise for CLDR-14502 --> CLDR-14582.
PR#1999 from ICU 71 release missed some of the cases.
- Changed all public Javadoc to use the proper verbiage for identifying this code as
a tech preview.
- Changed all references to ULocale in the API to use Locale instead.
- Changed PersonNameFormatter and SimplePersonName so that they're constructed by way
of separate builder objects.
- Added an internal constructor for PersonNameFormatter just for the use of the unit tests,
and added some unit tests that take advantage of the new constructor to test the internals
more thoroughly.
- Renamed format() to formatToString(), to make room to add a format() method later that
returns a FormattedPersonName.
- Added logic to guess the locale of a name object when the name object doesn't supply
a locale.
- Moved the function that constructs a SimplePersonName from a single string containing
key-value pairs out of the API and into the unit tests.
- Various smaller changes in response to API- and code-review comments.
Adjust RuleBasedBreakIterator::BreakCache::populateNear() to retain the cache
the cache contents in additional cases where are still useful, resulting in
improved performance.
This change is related to PR #2039, which addressed the same problem. This one
retains the cache contents in more situations.
String.split(String) and Pattern.split(CharSequence) have surprising behaviour.
"a:🅱️".split(":") produces ["a", "b"], when one would expect ["a", "", "b", ""]
The recommended fix is to use the Guava Splitter, or setting an explicit limit:
String.split(String,int limit) and Pattern.split(CharSequence,int limit)