mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-10 07:39:16 +00:00
ICU-20431 Both und_XX and _XX should fall back to the default locale
This commit is contained in:
parent
8858da9b7f
commit
168c97f32a
2 changed files with 5 additions and 1 deletions
|
@ -489,6 +489,9 @@ findFirstExisting(const char* path, char* name,
|
|||
|
||||
/*Fallback data stuff*/
|
||||
*hasChopped = chopLocale(name);
|
||||
if (*hasChopped && *name == '\0') {
|
||||
uprv_strcpy(name, "und");
|
||||
}
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
|
|
@ -1120,7 +1120,8 @@ void IntlTestDateTimePatternGeneratorAPI::testC() {
|
|||
UErrorCode status = U_ZERO_ERROR;
|
||||
int32_t numTests = UPRV_LENGTHOF(tests);
|
||||
for (int32_t i = 0; i < numTests; ++i) {
|
||||
DateTimePatternGenerator *gen = DateTimePatternGenerator::createInstance(Locale(tests[i][0]), status);
|
||||
DateTimePatternGenerator *gen = DateTimePatternGenerator::createInstance(
|
||||
Locale::forLanguageTag(tests[i][0], status), status);
|
||||
if (gen == NULL) {
|
||||
dataerrln("FAIL: DateTimePatternGenerator::createInstance failed for %s", tests[i][0]);
|
||||
return;
|
||||
|
|
Loading…
Add table
Reference in a new issue