Android patch: Add exceptions for big5han and gb2312han in genrb.
This change was introduced in Android by the ICU 53 upgrade:
https://android.googlesource.com/platform/external/icu/+/fceb398
Suppression of ICU4J test errors was added for ICU 55:
https://android.googlesource.com/platform/external/icu/+/7b913b1
(cherry picked from commit d9fc98087b091be81a9a50fbff9c0e22855d8dac)
Updated from upstream some "avail" flags for commented-out cases
Test: n/a
Change-Id: I49ff6ee9394d1ad002cb741b8d2bd008fef799de
diff --git a/icu4c/source/tools/genrb/parse.cpp b/icu4c/source/tools/genrb/parse.cpp
index 18a8c76..9990270 100644
--- a/icu4c/source/tools/genrb/parse.cpp
+++ b/icu4c/source/tools/genrb/parse.cpp
@@ -1035,7 +1035,11 @@
}
static UBool
-keepCollationType(const char * /*type*/) {
+keepCollationType(const char *type) { // android-changed
+ // BEGIN android-added
+ if (uprv_strcmp(type, "big5han") == 0) { return FALSE; }
+ if (uprv_strcmp(type, "gb2312han") == 0) { return FALSE; }
+ // END android-added
return TRUE;
}
diff --git a/icu4j/main/tests/collate/src/com/ibm/icu/dev/test/util/ICUResourceBundleCollationTest.java b/icu4j/main/tests/collate/src/com/ibm/icu/dev/test/util/ICUResourceBundleCollationTest.java
index e8a4b06..03d4f0b 100644
--- a/icu4j/main/tests/collate/src/com/ibm/icu/dev/test/util/ICUResourceBundleCollationTest.java
+++ b/icu4j/main/tests/collate/src/com/ibm/icu/dev/test/util/ICUResourceBundleCollationTest.java
@@ -30,6 +30,7 @@
@Test
public void TestFunctionalEquivalent(){
+ // Android patch: Add exceptions for big5han and gb2312han in genrb.
String[] collCases = {
// note: in ICU 64, empty locales are shown as available for collation
// avail locale equiv
@@ -49,19 +50,19 @@
"f", "zh_MO", "zh@collation=stroke", /* alias of zh_Hant_MO */
"t", "zh_Hant_MO", "zh@collation=stroke",
"f", "zh_TW_STROKE", "zh@collation=stroke",
- "f", "zh_TW_STROKE@collation=big5han", "zh@collation=big5han",
+ // "f", "zh_TW_STROKE@collation=big5han", "zh@collation=big5han",
"f", "sv_CN@calendar=japanese", "sv",
"t", "sv@calendar=japanese", "sv",
- "f", "zh_TW@collation=big5han", "zh@collation=big5han", /* alias of zh_Hant_TW */
- "t", "zh_Hant_TW@collation=big5han", "zh@collation=big5han",
- "f", "zh_TW@collation=gb2312han", "zh@collation=gb2312han", /* alias of zh_Hant_TW */
- "t", "zh_Hant_TW@collation=gb2312han", "zh@collation=gb2312han",
- "f", "zh_CN@collation=big5han", "zh@collation=big5han", /* alias of zh_Hans_CN */
- "t", "zh_Hans_CN@collation=big5han", "zh@collation=big5han",
- "f", "zh_CN@collation=gb2312han", "zh@collation=gb2312han", /* alias of zh_Hans_CN */
- "t", "zh_Hans_CN@collation=gb2312han", "zh@collation=gb2312han",
- "t", "zh@collation=big5han", "zh@collation=big5han",
- "t", "zh@collation=gb2312han", "zh@collation=gb2312han",
+ // "f", "zh_TW@collation=big5han", "zh@collation=big5han", /* alias of zh_Hant_TW */
+ // "t", "zh_Hant_TW@collation=big5han", "zh@collation=big5han",
+ // "f", "zh_TW@collation=gb2312han", "zh@collation=gb2312han", /* alias of zh_Hant_TW */
+ // "t", "zh_Hant_TW@collation=gb2312han", "zh@collation=gb2312han",
+ // "f", "zh_CN@collation=big5han", "zh@collation=big5han", /* alias of zh_Hans_CN */
+ // "t", "zh_Hans_CN@collation=big5han", "zh@collation=big5han",
+ // "f", "zh_CN@collation=gb2312han", "zh@collation=gb2312han", /* alias of zh_Hans_CN */
+ // "t", "zh_Hans_CN@collation=gb2312han", "zh@collation=gb2312han",
+ // "t", "zh@collation=big5han", "zh@collation=big5han",
+ // "t", "zh@collation=gb2312han", "zh@collation=gb2312han",
"t", "hi@collation=standard", "hi",
"f", "hi_AU@collation=standard;currency=CHF;calendar=buddhist", "hi",
"f", "sv_SE@collation=pinyin", "sv", /* bug 4582 tests */
@@ -73,6 +74,7 @@
"f", "nl_NL@collation=stroke", "root",
"f", "nl_NL_EEXT@collation=stroke", "root",
};
+ // Android patch end.
logln("Testing functional equivalents for collation...");
getFunctionalEquivalentTestCases(ICUData.ICU_COLLATION_BASE_NAME,