return FALSE;
}
UErrorCode status = U_ZERO_ERROR;
- uloc_getParent(loc, loc, (int32_t)uprv_strlen(loc), &status);
+ static const char en_GB[] = { u'e', u'n', u'_', u'G', u'B', 0 };
+ if (uprv_strcmp(loc, en_GB) == 0) {
+ // HACK: See #13368. We need "en_GB" to fall back to "en_001" instead of "en"
+ // in order to consume the correct data strings. This hack will be removed
+ // when proper data sink loading is implemented here.
+ // NOTE: "001" adds 1 char over "GB". However, both call sites allocate
+ // arrays with length ULOC_FULLNAME_CAPACITY (plenty of room for en_001).
+ loc[3] = u'0';
+ loc[4] = u'0';
+ loc[5] = u'1';
+ loc[6] = 0;
+ } else {
+ uloc_getParent(loc, loc, (int32_t)uprv_strlen(loc), &status);
+ }
/*
char *i = uprv_strrchr(loc, '_');
if (i == NULL) {
{ "en_GB", "euros4", euros4Sym, NULL, U_PARSE_ERROR, 4, 0.0, U_PARSE_ERROR, 4, 0.0, "" },
{ "en_GB", "euros6", euros6Sym, NULL, U_PARSE_ERROR, 1, 0.0, U_PARSE_ERROR, 1, 0.0, "" },
{ "en_GB", "euros8", euros8Sym, euros8PluEn, U_PARSE_ERROR, 0, 0.0, U_ZERO_ERROR, 2, 8.0, "EUR" },
- { "en_GB", "dollars4", dollarsUS4Sym, dollars4PluEn, U_PARSE_ERROR, 0, 0.0, U_ZERO_ERROR, 4, 4.0, "USD" }, // With CLDR 32/ICU 60, US$4 fails, $4 works, #13368
+ { "en_GB", "dollars4", dollarsUS4Sym, dollars4PluEn, U_PARSE_ERROR, 0, 0.0, U_ZERO_ERROR, 4, 4.0, "USD" },
{ "fr_FR", "euros4", euros4Sym, NULL, U_ZERO_ERROR, 6, 4.0, U_ZERO_ERROR, 6, 4.0, "EUR" },
{ "fr_FR", "euros6", euros6Sym, euros6PluFr, U_ZERO_ERROR, 3, 6.0, U_ZERO_ERROR, 3, 6.0, "EUR" },
status = U_ZERO_ERROR;
parsePos = 0;
parseCurr[0] = 0;
- if (currStr == dollarsUS4Sym && log_knownIssue("13368", "en_GB parsing of US$4 fails but $4 works")) {
- currStr = dollars4Sym;
- currExpectPos = 2;
- }
parseVal = unum_parseDoubleCurrency(unum, currStr, -1, &parsePos, parseCurr, &status);
u_austrncpy(parseCurrB, parseCurr, 4);
if (status != itemPtr->parsCurrExpectErr || parsePos != currExpectPos || parseVal != itemPtr->parsCurrExpectVal ||
showError("Invalid column values");
return;
}
- if (NFTT_GET_FIELD(fTuple,output,"")=="fail" && NFTT_GET_FIELD(fTuple,parse,"")=="$53.45" &&
- logKnownIssue("13368", "en_GB parsing of $53.45 as USD works, shouldn't") ) {
- // skip test
- } else if (runAllTests || !breaksC()) {
+ if (runAllTests || !breaksC()) {
UnicodeString errorMessage;
UBool shouldFail = (NFTT_GET_FIELD(fTuple, output, "") == "fail")
? !breaksC()