diff --git a/eng/prebuilts/mobile/icudt_hybrid.dat b/eng/prebuilts/mobile/icudt_hybrid.dat index 8f56b66d49b..36a78e7c75d 100644 Binary files a/eng/prebuilts/mobile/icudt_hybrid.dat and b/eng/prebuilts/mobile/icudt_hybrid.dat differ diff --git a/icu-filters/icudt_hg_mobile.json b/icu-filters/icudt_hg_mobile.json index 027cf02f1c4..5a4c030fbb3 100644 --- a/icu-filters/icudt_hg_mobile.json +++ b/icu-filters/icudt_hg_mobile.json @@ -231,37 +231,10 @@ "brkitr_rules": { "whitelist": ["char"] }, - "coll_tree": "exclude" + "coll_tree": "exclude", + "locales_tree": "exclude" }, "resourceFilters": [ - { - "categories": ["locales_tree"], - "rules": [ - "-/characterLabel", - "-/measurementSystemNames", - "-/listPattern", - "-/fields", - "-/delimiters", - "-/Ellipsis", - "-/NumberElements/latn/miscPatterns", - "-/NumberElements/latn/patternsLong", - "-/NumberElements/latn/patternsShort", - "-/NumberElements/*/patternsLong", - "-/NumberElements/*/patternsShort", - "-/NumberElements/minimalPairs", - "-/NumberElements/*/symbols", - "-/calendar/Gregorian/AmPmMarkers", - "-/calendar/Gregorian/AmPmMarkersAbbr", - "-/calendar/Gregorian/AmPmMarkersNarrow", - "-/parse", - "-/AuxExemplarCharacters", - "-/ExemplarCharacters", - "-/ExemplarCharactersIndex", - "-/ExemplarCharactersNumbers", - "-/ExemplarCharactersPunctuation", - "-/MoreInformation" - ] - }, { "categories": ["misc"], "files": { diff --git a/icu/icu4c/source/common/uloc.cpp b/icu/icu4c/source/common/uloc.cpp index ebfbb506508..a12c3f4cba1 100644 --- a/icu/icu4c/source/common/uloc.cpp +++ b/icu/icu4c/source/common/uloc.cpp @@ -1961,6 +1961,15 @@ uloc_getISO3Language(const char* localeID) return LANGUAGES_3[offset]; } +U_CAPI const char* U_EXPORT2 +uloc_getISO3LanguageByLangCode(const char* langCode) +{ + int16_t offset = _findIndex(LANGUAGES, langCode); + if (offset < 0) + return ""; + return LANGUAGES_3[offset]; +} + U_CAPI const char* U_EXPORT2 uloc_getISO3Country(const char* localeID) { @@ -1982,6 +1991,16 @@ uloc_getISO3Country(const char* localeID) return COUNTRIES_3[offset]; } +U_CAPI const char* U_EXPORT2 +uloc_getISO3CountryByCountryCode(const char* countryCode) +{ + int16_t offset = _findIndex(COUNTRIES, countryCode); + if (offset < 0) + return ""; + + return COUNTRIES_3[offset]; +} + U_CAPI uint32_t U_EXPORT2 uloc_getLCID(const char* localeID) { diff --git a/icu/icu4c/source/common/unicode/uloc.h b/icu/icu4c/source/common/unicode/uloc.h index 2c33c02bfd0..cf3466f6fbe 100644 --- a/icu/icu4c/source/common/unicode/uloc.h +++ b/icu/icu4c/source/common/unicode/uloc.h @@ -524,6 +524,15 @@ uloc_canonicalize(const char* localeID, U_CAPI const char* U_EXPORT2 uloc_getISO3Language(const char* localeID); +/** + * Gets the 3 letter ISO language code for the specified 2 letter language code. + * + * @param langCode Iso639LanguageTwoLetterName + * @return language the ISO language code for langCode + * DOTNET CUSTOM API + */ +U_CAPI const char* U_EXPORT2 +uloc_getISO3LanguageByLangCode(const char* langCode); /** * Gets the ISO country code for the specified locale. @@ -535,6 +544,16 @@ uloc_getISO3Language(const char* localeID); U_CAPI const char* U_EXPORT2 uloc_getISO3Country(const char* localeID); +/** + * Gets the 3 letter ISO country code for the specified 2 letter country code. + * + * @param countryCode Iso3166CountryName + * @return country the ISO country code for countryCode + * DOTNET CUSTOM API + */ +U_CAPI const char* U_EXPORT2 +uloc_getISO3CountryByCountryCode(const char* countryCode); + /** * Gets the Win32 LCID value for the specified locale. * If the ICU locale is not recognized by Windows, 0 will be returned. diff --git a/icu/icu4c/source/common/unicode/urename.h b/icu/icu4c/source/common/unicode/urename.h index fe59fdd893d..d44ef92dce7 100644 --- a/icu/icu4c/source/common/unicode/urename.h +++ b/icu/icu4c/source/common/unicode/urename.h @@ -1082,7 +1082,9 @@ #define uloc_getDisplayScript U_ICU_ENTRY_POINT_RENAME(uloc_getDisplayScript) #define uloc_getDisplayVariant U_ICU_ENTRY_POINT_RENAME(uloc_getDisplayVariant) #define uloc_getISO3Country U_ICU_ENTRY_POINT_RENAME(uloc_getISO3Country) +#define uloc_getISO3CountryByCountryCode U_ICU_ENTRY_POINT_RENAME(uloc_getISO3CountryByCountryCode) #define uloc_getISO3Language U_ICU_ENTRY_POINT_RENAME(uloc_getISO3Language) +#define uloc_getISO3LanguageByLangCode U_ICU_ENTRY_POINT_RENAME(uloc_getISO3LanguageByLangCode) #define uloc_getISOCountries U_ICU_ENTRY_POINT_RENAME(uloc_getISOCountries) #define uloc_getISOLanguages U_ICU_ENTRY_POINT_RENAME(uloc_getISOLanguages) #define uloc_getKeywordValue U_ICU_ENTRY_POINT_RENAME(uloc_getKeywordValue)