From: Peter Edberg Date: Tue, 15 Mar 2022 04:29:09 +0000 (-0700) Subject: ICU-21942 Fix Kosovo 3-letter code to be XKK for uloc_getISO3Country etc. X-Git-Tag: release-71-rc~9 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dbf7c20be650d9425ba8f25784c3f70b4c07f838;p=icu ICU-21942 Fix Kosovo 3-letter code to be XKK for uloc_getISO3Country etc. --- diff --git a/icu4c/source/common/uloc.cpp b/icu4c/source/common/uloc.cpp index c8a3f1ff731..b34a1f305c3 100644 --- a/icu4c/source/common/uloc.cpp +++ b/icu4c/source/common/uloc.cpp @@ -444,7 +444,7 @@ static const char * const COUNTRIES_3[] = { /* "VA", "VC", "VE", "VG", "VI", "VN", "VU", "WF", */ "VAT", "VCT", "VEN", "VGB", "VIR", "VNM", "VUT", "WLF", /* "WS", "XK", "YE", "YT", "ZA", "ZM", "ZW", */ - "WSM", "XXK", "YEM", "MYT", "ZAF", "ZMB", "ZWE", + "WSM", "XKK", "YEM", "MYT", "ZAF", "ZMB", "ZWE", NULL, /* "AN", "BU", "CS", "FX", "RO", "SU", "TP", "YD", "YU", "ZR" */ "ANT", "BUR", "SCG", "FXX", "ROM", "SUN", "TMP", "YMD", "YUG", "ZAR", diff --git a/icu4c/source/test/cintltst/cloctst.c b/icu4c/source/test/cintltst/cloctst.c index c8ebe7d9bf4..606e0a2794b 100644 --- a/icu4c/source/test/cintltst/cloctst.c +++ b/icu4c/source/test/cintltst/cloctst.c @@ -1552,18 +1552,18 @@ static void TestSimpleDisplayNames() static void TestUninstalledISO3Names() { /* This test checks to make sure getISO3Language and getISO3Country work right - even for locales that are not installed. */ + even for locales that are not installed (and some installed ones). */ static const char iso2Languages [][4] = { "am", "ba", "fy", "mr", "rn", - "ss", "tw", "zu" }; + "ss", "tw", "zu", "sr" }; static const char iso3Languages [][5] = { "amh", "bak", "fry", "mar", "run", - "ssw", "twi", "zul" }; + "ssw", "twi", "zul", "srp" }; static const char iso2Countries [][6] = { "am_AF", "ba_BW", "fy_KZ", "mr_MO", "rn_MN", - "ss_SB", "tw_TC", "zu_ZW" }; + "ss_SB", "tw_TC", "zu_ZW", "sr_XK" }; static const char iso3Countries [][4] = { "AFG", "BWA", "KAZ", "MAC", "MNG", - "SLB", "TCA", "ZWE" }; + "SLB", "TCA", "ZWE", "XKK" }; int32_t i; - for (i = 0; i < 8; i++) { + for (i = 0; i < 9; i++) { UErrorCode err = U_ZERO_ERROR; const char *test; test = uloc_getISO3Language(iso2Languages[i]); @@ -1571,7 +1571,7 @@ static void TestUninstalledISO3Names() log_err("Got wrong ISO3 code for %s : Expected \"%s\", got \"%s\". %s\n", iso2Languages[i], iso3Languages[i], test, myErrorName(err)); } - for (i = 0; i < 8; i++) { + for (i = 0; i < 9; i++) { UErrorCode err = U_ZERO_ERROR; const char *test; test = uloc_getISO3Country(iso2Countries[i]);