arc{"الآرامية"}
arn{"المابودونغونية"}
arp{"الأراباهو"}
- ars{"اللهجة النجدية"}
+ ars{"العربية، النجدية"}
arw{"الأراواكية"}
as{"الأسامية"}
asa{"الآسو"}
chp{"الشيباوايان"}
chr{"الشيروكي"}
chy{"الشايان"}
- ckb{"السورانية الكردية"}
+ ckb{"الكردية، السورانية"}
co{"الكورسيكية"}
cop{"القبطية"}
cr{"الكرى"}
chp{"chipewyan"}
chr{"cherokee"}
chy{"xeiene"}
- ckb{"kurd central"}
+ ckb{"kurd sorani"}
co{"cors"}
cop{"copte"}
cr{"cree"}
arc{"aramæisk"}
arn{"mapudungun"}
arp{"arapaho"}
- ars{"Najd-arabisk"}
+ ars{"arabisk, najdi"}
arw{"arawak"}
as{"assamesisk"}
asa{"asu"}
chp{"chipewyan"}
chr{"cherokee"}
chy{"cheyenne"}
- ckb{"sorani"}
+ ckb{"kurdisk, sorani"}
co{"korsikansk"}
cop{"koptisk"}
cr{"cree"}
chp{"Chipewyan"}
chr{"Cherokee"}
chy{"Cheyenne"}
- ckb{"Zentralkurdisch"}
+ ckb{"Kurdisch (Sorani)"}
co{"Korsisch"}
cop{"Koptisch"}
cps{"Capiznon"}
aro{"Araona"}
arp{"Arapaho"}
arq{"Algerian Arabic"}
- ars{"Najdi Arabic"}
+ ars{"Arabic, Najdi"}
arw{"Arawak"}
ary{"Moroccan Arabic"}
arz{"Egyptian Arabic"}
chp{"Chipewyan"}
chr{"Cherokee"}
chy{"Cheyenne"}
- ckb{"Central Kurdish"}
+ ckb{"Kurdish, Sorani"}
co{"Corsican"}
cop{"Coptic"}
cps{"Capiznon"}
en_AU{
%%Parent{"en_001"}
Languages{
+ ars{"Arabic (Najdi)"}
bn{"Bengali"}
+ ckb{"Kurdish (Sorani)"}
en_US{"United States English"}
frc{"frc"}
lou{"lou"}
ady{"adigeo"}
alt{"altái del sur"}
arp{"arapajó"}
- ars{"árabe de Néyed"}
bla{"siksiká"}
ccp{"chakma"}
eu{"vasco"}
chp{"chipewyan"}
chr{"cherokee"}
chy{"cheyenne"}
- ckb{"sorani"}
+ ckb{"kurdi – soranî"}
co{"korsika"}
cop{"kopti"}
cps{"capiznon"}
chp{"chipewyan"}
chr{"cherokee"}
chy{"cheyenne"}
- ckb{"sorani"}
+ ckb{"kurde sorani"}
co{"corse"}
cop{"copte"}
cps{"capiznon"}
byv{"medumba"}
chg{"tchagatay"}
chn{"chinook"}
- ckb{"kurde central"}
cr{"cri"}
den{"slave"}
dgr{"tlicho"}
arc{"ארמית"}
arn{"אראוקנית"}
arp{"אראפהו"}
- ars{"ער×\91×\99ת - × ×\92׳ד"}
+ ars{"ער×\91×\99ת - × ×³×\92ד"}
arw{"ארוואק"}
as{"אסאמית"}
asa{"אסו"}
chp{"צ׳יפוויאן"}
chr{"צ׳רוקי"}
chy{"שאיין"}
- ckb{"כורדית סוראנית"}
+ ckb{"כורדית - סוראני"}
co{"קורסיקנית"}
cop{"קופטית"}
cr{"קרי"}
arc{"ऐरेमेक"}
arn{"मापूचे"}
arp{"अरापाहो"}
- ars{"नà¤\9cà¥\8dदà¥\80 à¤\85रबी"}
+ ars{"à¤\85रबà¥\80, नà¤\9cà¥\8dदी"}
arw{"अरावक"}
as{"असमिया"}
asa{"असु"}
chp{"शिपेव्यान"}
chr{"चेरोकी"}
chy{"शेयेन्न"}
- ckb{"सà¥\8bरानà¥\80 à¤\95à¥\81रà¥\8dदिश"}
+ ckb{"à¤\95à¥\81रà¥\8dदà¥\80, सà¥\8bरानà¥\80"}
co{"कोर्सीकन"}
cop{"कॉप्टिक"}
cr{"क्री"}
arc{"aramejski"}
arn{"mapuche"}
arp{"arapaho"}
- ars{"najdi arapski"}
+ ars{"arapski, najdi"}
arw{"aravački"}
as{"asamski"}
asa{"asu"}
chp{"chipewyan"}
chr{"čerokijski"}
chy{"čejenski"}
- ckb{"soranski kurdski"}
+ ckb{"kurdski, sorani"}
co{"korzički"}
cop{"koptski"}
cr{"cree"}
arc{"arámi"}
arn{"mapucse"}
arp{"arapaho"}
- ars{"nedzsdi arab"}
+ ars{"arab, nedzsdi"}
arw{"aravak"}
as{"asszámi"}
asa{"asu"}
chp{"csipevé"}
chr{"cseroki"}
chy{"csejen"}
- ckb{"közép-ázsiai kurd"}
+ ckb{"kurd, szoráni"}
co{"korzikai"}
cop{"kopt"}
cr{"krí"}
arn{"マプチェ語"}
aro{"アラオナ語"}
arp{"アラパホー語"}
- arq{"ã\82¢ã\83«ã\82¸ã\82§ã\83ªã\82¢ã\83»ã\82¢ã\83©ã\83\93ã\82¢èª\9e"}
- ars{"ã\83\8aã\82¸ã\83¥ã\83\89å\9c°æ\96¹ã\83»ã\82¢ã\83©ã\83\93ã\82¢èª\9e"}
+ arq{"ã\82¢ã\83©ã\83\93ã\82¢èª\9eï¼\88ã\82¢ã\83«ã\82¸ã\82§ã\83ªã\82¢ï¼\89"}
+ ars{"ã\82¢ã\83©ã\83\93ã\82¢èª\9eï¼\88ã\83\8aã\82¸ã\83¥ã\83\89å\9c°æ\96¹ï¼\89"}
arw{"アラワク語"}
ary{"モロッコ・アラビア語"}
arz{"エジプト・アラビア語"}
Nkoo{"ンコ文字"}
Nshu{"女書"}
Ogam{"オガム文字"}
- Olck{"オルチキ文字"}
+ Olck{"ã\82ªã\83«ã\83»ã\83\81ã\82æ\96\87å\97"}
Orkh{"オルホン文字"}
Orya{"オリヤー文字"}
Osma{"オスマニア文字"}
mymrshan{"ミャンマー・シャン数字"}
native{"独自の記数法"}
nkoo{"ンコ数字"}
- olck{"オルチキ数字"}
+ olck{"ã\82ªã\83«ã\83»ã\83\81ã\82æ\95°å\97"}
orya{"オリヤー数字"}
osma{"オスマニア数字"}
roman{"ローマ数字"}
arc{"아람어"}
arn{"마푸둥군어"}
arp{"아라파호어"}
- arq{"ì\95\8cì \9c리 ì\95\84ë\9e\8dì\96´"}
+ arq{"ì\95\84ë\9e\8dì\96´(ì\95\8cì \9c리)"}
ars{"아랍어(나즈디)"}
arw{"아라와크어"}
ary{"모로코 아랍어"}
chp{"치페우얀"}
chr{"체로키어"}
chy{"샤이엔어"}
- ckb{"ì\86\8cë\9d¼ë\8b\88 ì¿ ë¥´ë\93\9cì\96´"}
+ ckb{"ì¿ ë¥´ë\93\9cì\96´(ì\86\8cë\9d¼ë\8b\88)"}
co{"코르시카어"}
cop{"콥트어"}
cr{"크리어"}
aro{"araona"}
arp{"arapaho"}
arq{"algerisk arabisk"}
- ars{"najdi-arabisk"}
+ ars{"arabisk (najd)"}
arw{"arawak"}
ary{"marokkansk-arabisk"}
arz{"egyptisk arabisk"}
aro{"Araona"}
arp{"Arapaho"}
arq{"Algerijns Arabisch"}
- ars{"Nadjdi-Arabisch"}
+ ars{"Arabisch, Nadjdi"}
arw{"Arawak"}
ary{"Marokkaans Arabisch"}
arz{"Egyptisch Arabisch"}
chp{"Chipewyan"}
chr{"Cherokee"}
chy{"Cheyenne"}
- ckb{"Soranî"}
+ ckb{"Koerdisch, Soranî"}
co{"Corsicaans"}
cop{"Koptisch"}
cps{"Capiznon"}
chp{"czipewiański"}
chr{"czirokeski"}
chy{"czejeński"}
- ckb{"sorani"}
+ ckb{"kurdyjski sorani"}
co{"korsykański"}
cop{"koptyjski"}
cps{"capiznon"}
chp{"chipewyan"}
chr{"cheroqui"}
chy{"cheiene"}
- ckb{"curdo central"}
+ ckb{"curdo sorâni"}
co{"corso"}
cop{"copta"}
cr{"cree"}
ang{"inglês antigo"}
ar_001{"árabe moderno padrão"}
arn{"mapuche"}
- ars{"árabe do Négede"}
av{"avaric"}
bax{"bamun"}
bbj{"ghomala"}
chn{"jargão chinook"}
chr{"cherokee"}
chy{"cheyenne"}
- ckb{"sorani curdo"}
+ ckb{"curdo sorani"}
co{"córsico"}
crs{"francês crioulo seselwa"}
cs{"checo"}
chp{"chipewyan"}
chr{"cherokee"}
chy{"cheyenne"}
- ckb{"kurdă centrală"}
+ ckb{"kurdă sorani"}
co{"corsicană"}
cop{"coptă"}
cr{"cree"}
arc{"арамейский"}
arn{"мапуче"}
arp{"арапахо"}
- ars{"недждийÑ\81кий аÑ\80абÑ\81кий"}
+ ars{"аÑ\80абÑ\81каÑ\8f (недждийÑ\81кий)"}
arw{"аравакский"}
as{"ассамский"}
asa{"асу"}
chp{"чипевьян"}
chr{"чероки"}
chy{"шайенский"}
- ckb{"сорани"}
+ ckb{"курдская (сорани)"}
co{"корсиканский"}
cop{"коптский"}
cr{"кри"}
aro{"araoniska"}
arp{"arapaho"}
arq{"algerisk arabiska"}
- ars{"najdiarabiska"}
+ ars{"arabiska (najd)"}
arw{"arawakiska"}
ary{"marockansk arabiska"}
arz{"egyptisk arabiska"}
chp{"chipewyan"}
chr{"cherokesiska"}
chy{"cheyenne"}
- ckb{"soranisk kurdiska"}
+ ckb{"kurdiska (sorani)"}
co{"korsikanska"}
cop{"koptiska"}
cps{"kapisnon"}
chp{"ชิพิวยัน"}
chr{"เชอโรกี"}
chy{"เชเยนเน"}
- ckb{"à¹\80à¸\84ิรà¹\8cà¸\94à¸\95à¸à¸\99à¸\81ลาà¸\87"}
+ ckb{"à¹\80à¸\84ิรà¹\8cà¸\94à¹\82à¸\8bราà¸\99ี"}
co{"คอร์ซิกา"}
cop{"คอปติก"}
cps{"กาปิซนอน"}
aro{"Araona"}
arp{"Arapaho Dili"}
arq{"Cezayir Arapçası"}
- ars{"Necd Arapçası"}
+ ars{"Arapça, Necd"}
arw{"Arawak Dili"}
ary{"Fas Arapçası"}
arz{"Mısır Arapçası"}
chp{"Çipevya dili"}
chr{"Çerokice"}
chy{"Şayence"}
- ckb{"Orta Kürtçe"}
+ ckb{"Kürtçe, Sorani"}
co{"Korsikaca"}
cop{"Kıptice"}
cps{"Capiznon"}
aro{"араона"}
arp{"арапахо"}
arq{"алжирська арабська"}
- ars{"надждÑ\96йÑ\81Ñ\8cка аÑ\80абська"}
+ ars{"аÑ\80абÑ\81Ñ\8cка, надждÑ\96йська"}
arw{"аравакська"}
as{"асамська"}
asa{"асу"}
chp{"чіпевʼян"}
chr{"черокі"}
chy{"чейєнн"}
- ckb{"центральнокурдська"}
+ ckb{"курдська, сорані"}
co{"корсиканська"}
cop{"коптська"}
cr{"крі"}
chp{"Tiếng Chipewyan"}
chr{"Tiếng Cherokee"}
chy{"Tiếng Cheyenne"}
- ckb{"Tiếng Kurd Miền Trung"}
+ ckb{"Tiếng Kurd Sorani"}
co{"Tiếng Corsica"}
cop{"Tiếng Coptic"}
cps{"Tiếng Capiznon"}
arc{"阿拉米语"}
arn{"马普切语"}
arp{"阿拉帕霍语"}
- ars{"纳吉迪阿拉伯语"}
+ ars{"阿拉伯语(纳吉迪)"}
arw{"阿拉瓦克语"}
as{"阿萨姆语"}
asa{"阿苏语"}
chp{"奇佩维安语"}
chr{"切罗基语"}
chy{"夏延语"}
- ckb{"中库尔德语"}
+ ckb{"库尔德语(索拉尼)"}
co{"科西嘉语"}
cop{"科普特语"}
cr{"克里族语"}
aro{"阿拉奧納文"}
arp{"阿拉帕霍文"}
arq{"阿爾及利亞阿拉伯文"}
- ars{"納吉迪阿拉伯文"}
+ ars{"阿拉伯文(納吉迪)"}
arw{"阿拉瓦克文"}
ary{"摩洛哥阿拉伯文"}
arz{"埃及阿拉伯文"}
chp{"奇佩瓦揚文"}
chr{"柴羅基文"}
chy{"沙伊安文"}
- ckb{"中庫德文"}
+ ckb{"庫德文(索拉尼)"}
co{"科西嘉文"}
cop{"科普特文"}
cps{"卡皮茲文"}
}
}
}
+ japanese{
+ DateTimePatterns{
+ "h:mm:ss a zzzz",
+ "h:mm:ss a z",
+ "h:mm:ss a",
+ "h:mm a",
+ "EEEE, d MMMM y G",
+ "d MMMM y G",
+ "d MMM y G",
+ "dd/MM/y GGGGG",
+ "{1}, {0}",
+ "{1} 'at' {0}",
+ "{1} 'at' {0}",
+ "{1} 'at' {0}",
+ "{1}, {0}",
+ }
+ }
}
fields{
dayOfYear-narrow{
"{1}, {0}",
}
availableFormats{
+ H{"HH"}
+ Hm{"HH:mm"}
+ Hms{"HH:mm:ss"}
+ Hmsv{"HH:mm:ss v"}
+ Hmv{"HH:mm v"}
MEd{"E d/M"}
+ MMMEd{"E, d MMM"}
+ MMMMd{"d MMMM"}
+ MMMd{"d MMM"}
Md{"d/M"}
h{"h a"}
hm{"h:mm a"}
hms{"h:mm:ss a"}
hmsv{"h:mm:ss a v"}
hmv{"h:mm a v"}
+ ms{"mm:ss"}
+ yyyyM{"MM/y GGGGG"}
yyyyMEd{"E d/M/y G"}
+ yyyyMMMEd{"E, d MMM y G"}
+ yyyyMMMd{"d MMM y G"}
yyyyMd{"d/M/y G"}
}
}
"{1} 'at' {0}",
"{1}, {0}",
}
- availableFormats{
- MEd{"E d/M"}
- Md{"d/M"}
- yMEd{"E d/M/y"}
- yMd{"d/M/y"}
- }
}
}
}
}
}
}
+ minimumGroupingDigits{"1"}
}
Version{"2.1.47.96"}
calendar{
}
}
gregorian{
- AmPmMarkers{
- "a. m.",
- "p. m.",
- }
- AmPmMarkersAbbr{
- "a. m.",
- "p. m.",
- }
DateTimePatterns{
"H:mm:ss zzzz",
"H:mm:ss z",
other{"A kosár tartalma: {0} X. Megveszi őket?"}
}
}
- minimumGroupingDigits{"4"}
+ minimumGroupingDigits{"1"}
native{"latn"}
}
Version{"2.1.48.42"}
duration{
day{
dnam{"giorno"}
- one{"{0}g"}
- other{"{0}g"}
+ one{"{0} g"}
+ other{"{0} g"}
}
hour{
dnam{"ora"}
- one{"{0}h"}
- other{"{0}h"}
+ one{"{0} h"}
+ other{"{0} h"}
}
millisecond{
dnam{"ms"}
- one{"{0}ms"}
- other{"{0}ms"}
+ one{"{0} ms"}
+ other{"{0} ms"}
}
minute{
dnam{"min"}
- one{"{0}min"}
- other{"{0}min"}
+ one{"{0} min"}
+ other{"{0} min"}
}
month{
dnam{"mese"}
}
second{
dnam{"s"}
- one{"{0}s"}
- other{"{0}s"}
+ one{"{0} s"}
+ other{"{0} s"}
}
week{
dnam{"sett."}
}
day{
dnam{"døgn"}
- one{"{0}d"}
- other{"{0}d"}
+ one{"{0} d"}
+ other{"{0} d"}
per{"{0}/d"}
}
hour{
dnam{"time"}
- one{"{0}t"}
- other{"{0}t"}
+ one{"{0} t"}
+ other{"{0} t"}
per{"{0}/t"}
}
microsecond{
dnam{"μs"}
- one{"{0}μs"}
- other{"{0}μs"}
+ one{"{0} μs"}
+ other{"{0} μs"}
}
millisecond{
dnam{"ms"}
- one{"{0}ms"}
- other{"{0}ms"}
+ one{"{0} ms"}
+ other{"{0} ms"}
}
minute{
dnam{"min"}
- one{"{0}m"}
- other{"{0}m"}
+ one{"{0} m"}
+ other{"{0} m"}
per{"{0}/m"}
}
month{
}
nanosecond{
dnam{"ns"}
- one{"{0}ns"}
- other{"{0}ns"}
+ one{"{0} ns"}
+ other{"{0} ns"}
}
second{
dnam{"sek"}
- one{"{0}s"}
- other{"{0}s"}
+ one{"{0} s"}
+ other{"{0} s"}
per{"{0}/s"}
}
week{
one{"{0}°"}
other{"{0}°"}
}
+ fahrenheit{
+ dnam{"°F"}
+ other{"{0}°F"}
+ }
}
torque{
newton-meter{
other{"{0} kt"}
}
}
+ temperature{
+ celsius{
+ dnam{"°C"}
+ other{"{0} °C"}
+ }
+ fahrenheit{
+ dnam{"°F"}
+ other{"{0} °F"}
+ }
+ }
torque{
newton-meter{
dnam{"N⋅m"}
speed{
kilometer-per-hour{
dnam{"公里/小時"}
- other{"每小時 {0} 公里"}
+ other{"{0}公里/小時"}
}
knot{
dnam{"節"}
}
meter-per-second{
dnam{"米/秒"}
- other{"每秒 {0} 米"}
+ other{"{0}米/秒"}
}
mile-per-hour{
dnam{"英里/小時"}
speed{
kilometer-per-hour{
dnam{"公里/小時"}
- other{"{0}公里/小時"}
+ other{"{0}公里/時"}
}
meter-per-second{
- other{"{0}m/s"}
+ other{"{0}米/秒"}
}
mile-per-hour{
other{"{0}英里/小時"}
speed{
kilometer-per-hour{
dnam{"公里/小時"}
- other{"每小時{0}公里"}
+ other{"{0}公里/時"}
}
knot{
dnam{"節"}
}
meter-per-second{
dnam{"米/秒"}
- other{"每秒{0}米"}
+ other{"{0}米/秒"}
}
mile-per-hour{
dnam{"英里/小時"}
speed{
kilometer-per-hour{
dnam{"每小时公里"}
- other{"每小时 {0} 公里"}
+ other{"{0}公里/小时"}
}
knot{
dnam{"节"}
}
meter-per-second{
dnam{"每秒公尺"}
- other{"每秒 {0} 米"}
+ other{"{0}米/秒"}
}
mile-per-hour{
dnam{"每小时英里"}
speed{
kilometer-per-hour{
dnam{"公里/小时"}
- other{"{0}公里/小时"}
+ other{"{0}公里/时"}
}
meter-per-second{
- other{"{0}m/s"}
+ other{"{0}米/秒"}
}
mile-per-hour{
other{"{0}英里/小时"}
speed{
kilometer-per-hour{
dnam{"公里/小时"}
- other{"每小时{0}公里"}
+ other{"{0}公里/时"}
}
knot{
dnam{"节"}
}
meter-per-second{
dnam{"公尺/秒"}
- other{"每秒{0}米"}
+ other{"{0}米/秒"}
}
mile-per-hour{
dnam{"英里/小时"}
bestConfidenceSoFar = confidence;
}
}
+ if (bestConfidenceSoFar < 10 && textIn->fOnlyTypicalASCII) { // rdar://56373519
+ bestConfidenceSoFar = 15;
+ results->set(textIn, this, bestConfidenceSoFar, name);
+ }
return (bestConfidenceSoFar > 0);
}
char16_t localBuffer[localCapacity];
char16_t* ptr = localBuffer + localCapacity;
int8_t group = 0;
- for (int8_t i = 0; i < fields->fastData.maxInt && (input != 0 || i < fields->fastData.minInt); i++) {
+ int8_t minInt = (fields->fastData.minInt < 1)? 1: fields->fastData.minInt; // rdar://54569257
+ for (int8_t i = 0; i < fields->fastData.maxInt && (input != 0 || i < minInt); i++) {
if (group++ == 3 && fields->fastData.cpGroupingSeparator != 0) {
*(--ptr) = fields->fastData.cpGroupingSeparator;
group = 1;
{
fInputLen = 0;
fC1Bytes = FALSE;
+ fOnlyTypicalASCII = FALSE; // rdar://56373519
fRawInput = (const uint8_t *) in;
fRawLength = len == -1? (int32_t)uprv_strlen(in) : len;
}
fByteStats[fInputBytes[srci]] += 1;
}
- for (int32_t i = 0x80; i <= 0x9F; i += 1) {
+ fOnlyTypicalASCII = TRUE; // rdar://56373519
+ for (int32_t i = 0x01; i <= 0xFF; i += 1) {
if (fByteStats[i] != 0) {
- fC1Bytes = TRUE;
- break;
+ if ((i < 0x20 && i != 0x09 && i != 0x0A && i != 0x0D) || i > 0x7E) {
+ fOnlyTypicalASCII = FALSE; // rdar://56373519
+ if (i >= 0x80 && i <= 0x9F) {
+ fC1Bytes = TRUE;
+ }
+ }
}
}
+ if (fByteStats[0] > 1) {
+ fOnlyTypicalASCII = FALSE;
+ }
}
U_NAMESPACE_END
// Value is rounded up, so zero really means zero occurences.
int16_t *fByteStats;
UBool fC1Bytes; // True if any bytes in the range 0x80 - 0x9F are in the input;false by default
+ UBool fOnlyTypicalASCII; // True if has only byte values that are typical for ASCII // rdar://56373519
char *fDeclaredEncoding;
const uint8_t *fRawInput; // Original, untouched input bytes.
// Validate min/max int/frac.
// For backwards compatibility, minimum overrides maximum if the two conflict.
// The following logic ensures that there is always a minimum of at least one digit.
+ // Except that we allow minInt=0, minFrac=0 if maxInt!=0 - rdar://54569257
if (minInt == 0 && maxFrac != 0) {
// Force a digit after the decimal point.
- minFrac = minFrac <= 0 ? 1 : minFrac;
+ minFrac = (minFrac < 0 || (minFrac==0 && maxInt==0)) ? 1 : minFrac; // rdar://54569257
maxFrac = maxFrac < 0 ? -1 : maxFrac < minFrac ? minFrac : maxFrac;
minInt = 0;
maxInt = maxInt < 0 ? -1 : maxInt > kMaxIntFracSig ? -1 : maxInt;
/*Testing udat_getSymbols() and udat_setSymbols() and udat_countSymbols()*/
static void TestSymbols()
{
- UDateFormat *def, *fr, *zhChiCal;
+ UDateFormat *def, *fr, *zhChiCal, *esMX;
UErrorCode status = U_ZERO_ERROR;
UChar *value=NULL;
UChar *result = NULL;
myErrorName(status) );
return;
}
+ /*creating a dateformat with es_MX locale */
+ log_verbose("\ncreating a date format with es_MX locale\n");
+ esMX = udat_open(UDAT_SHORT, UDAT_NONE, "es_MX", NULL, 0, NULL, 0, &status);
+ if(U_FAILURE(status))
+ {
+ log_data_err("error in creating the dateformat using no date, short time, locale es_MX -> %s (Are you missing data?)\n",
+ myErrorName(status) );
+ return;
+ }
/*Testing countSymbols, getSymbols and setSymbols*/
VerifygetSymbols(zhChiCal, UDAT_CYCLIC_YEARS_NARROW, 59, "\\u7678\\u4EA5");
VerifygetSymbols(zhChiCal, UDAT_ZODIAC_NAMES_ABBREVIATED, 0, "\\u9F20");
VerifygetSymbols(zhChiCal, UDAT_ZODIAC_NAMES_WIDE, 11, "\\u732A");
+ VerifygetSymbols(esMX, UDAT_AM_PMS, 0, "a.m."); // see <rdar://problem/52923924>
+ VerifygetSymbols(esMX, UDAT_AM_PMS, 1, "p.m."); // see <rdar://problem/52923924>
#if UDAT_HAS_PATTERN_CHAR_FOR_TIME_SEPARATOR
VerifygetSymbols(def,UDAT_LOCALIZED_CHARS, 0, "GyMdkHmsSEDFwWahKzYeugAZvcLQqVUOXxrbB:");
#else
udat_close(fr);
udat_close(def);
udat_close(zhChiCal);
+ udat_close(esMX);
if(result != NULL) {
free(result);
result = NULL;
NULL
};
+static const char * remapResults_en_IN[] = { // rdar://56309604
+ "h:mm:ss a zzzz", // full
+ "HH:mm:ss zzzz", // force24
+ "h:mm:ss a zzzz", // force12
+ "h:mm:ss a z", // long
+ "HH:mm:ss z", // force24
+ "h:mm:ss a z", // force12
+ "h:mm:ss a", // medium
+ "HH:mm:ss", // force24
+ "h:mm:ss a", // force12
+ "h:mm a", // short
+ "HH:mm", // force24
+ "h:mm a", // force12
+ "EEEE, d MMMM y 'at' h:mm:ss a z", // long_df
+ "EEEE, d MMMM y 'at' HH:mm:ss z", // force24
+ "EEEE, d MMMM y 'at' h:mm:ss a z", // force12
+ "dd/MM/yy, h:mm a", // short_ds
+ "dd/MM/yy, HH:mm", // force24
+ "dd/MM/yy, h:mm a", // force12
+
+ "h:mm:ss a", // jmmss
+ "HH:mm:ss", // force24
+ "h:mm:ss a", // force12
+ "h:mm:ss a", // jjmmss
+ "HH:mm:ss", // force24
+ "HH:mm:ss", // force24 | match hour field length
+ "h:mm:ss a", // force12
+ "hh:mm:ss a", // force12 | match hour field length
+ "hh:mm", // Jmm
+ "HH:mm", // force24
+ "hh:mm", // force12
+ "h:mm:ss a v", // jmsv
+ "HH:mm:ss v", // force24
+ "h:mm:ss a v", // force12
+ "h:mm:ss a z", // jmsz
+ "HH:mm:ss z", // force24
+ "h:mm:ss a z", // force12
+
+ "h:mm:ss a", // "h:mm:ss"
+ "HH:mm:ss", //
+ "a'xx'h:mm:ss d MMM y", // "a'xx'h:mm:ss d MMM y"
+ "HH:mm:ss d MMM y", //
+ "EEE, d MMM y 'aha' h:mm:ss a 'hrs'", // "EEE, d MMM y 'aha' h:mm:ss a 'hrs'"
+ "EEE, d MMM y 'aha' HH:mm:ss 'hrs'", //
+ "EEE, d MMM y 'aha' a'xx'h:mm:ss", // "EEE, d MMM y 'aha' a'xx'h:mm:ss"
+ "EEE, d MMM y 'aha' HH:mm:ss", //
+ "yyMMddhhmmss", // "yyMMddhhmmss"
+ "yyMMddHHmmss", //
+
+ "h:mm:ss a", // "H:mm:ss"
+ "H:mm:ss", //
+ "h:mm:ss a d MMM y", // "H:mm:ss d MMM y"
+ "H:mm:ss d MMM y", //
+ "EEE, d MMM y 'aha' h:mm:ss a 'hrs'", // "EEE, d MMM y 'aha' H:mm:ss 'hrs'"
+ "EEE, d MMM y 'aha' H:mm:ss 'hrs'", //
+ "EEE, d MMM y 'aha' h'h'mm'm'ss a", // "EEE, d MMM y 'aha' H'h'mm'm'ss"
+ "EEE, d MMM y 'aha' H'h'mm'm'ss", //
+
+ "uuuu-MM-dd h:mm:ss a '+0000'", //
+
+ NULL
+};
+
+static const char * remapResults_en_IN_japanese[] = { // rdar://56309604
+ "h:mm:ss a zzzz", // full
+ "HH:mm:ss zzzz", // force24
+ "h:mm:ss a zzzz", // force12
+ "h:mm:ss a z", // long
+ "HH:mm:ss z", // force24
+ "h:mm:ss a z", // force12
+ "h:mm:ss a", // medium
+ "HH:mm:ss", // force24
+ "h:mm:ss a", // force12
+ "h:mm a", // short
+ "HH:mm", // force24
+ "h:mm a", // force12
+ "EEEE, d MMMM y G 'at' h:mm:ss a z", // long_df
+ "EEEE, d MMMM y G 'at' HH:mm:ss z", // force24
+ "EEEE, d MMMM y G 'at' h:mm:ss a z", // force12
+ "dd/MM/y GGGGG, h:mm a", // short_ds
+ "dd/MM/y GGGGG, HH:mm", // force24
+ "dd/MM/y GGGGG, h:mm a", // force12
+
+ "h:mm:ss a", // jmmss
+ "HH:mm:ss", // force24
+ "h:mm:ss a", // force12
+ "h:mm:ss a", // jjmmss
+ "HH:mm:ss", // force24
+ "HH:mm:ss", // force24 | match hour field length
+ "h:mm:ss a", // force12
+ "hh:mm:ss a", // force12 | match hour field length
+ "hh:mm", // Jmm
+ "HH:mm", // force24
+ "hh:mm", // force12
+ "h:mm:ss a v", // jmsv
+ "HH:mm:ss v", // force24
+ "h:mm:ss a v", // force12
+ "h:mm:ss a z", // jmsz
+ "HH:mm:ss z", // force24
+ "h:mm:ss a z", // force12
+
+ "h:mm:ss a", // "h:mm:ss"
+ "HH:mm:ss", //
+ "a'xx'h:mm:ss d MMM y", // "a'xx'h:mm:ss d MMM y"
+ "HH:mm:ss d MMM y", //
+ "EEE, d MMM y 'aha' h:mm:ss a 'hrs'", // "EEE, d MMM y 'aha' h:mm:ss a 'hrs'"
+ "EEE, d MMM y 'aha' HH:mm:ss 'hrs'", //
+ "EEE, d MMM y 'aha' a'xx'h:mm:ss", // "EEE, d MMM y 'aha' a'xx'h:mm:ss"
+ "EEE, d MMM y 'aha' HH:mm:ss", //
+ "yyMMddhhmmss", // "yyMMddhhmmss"
+ "yyMMddHHmmss", //
+
+ "h:mm:ss a", // "H:mm:ss"
+ "H:mm:ss", //
+ "h:mm:ss a d MMM y", // "H:mm:ss d MMM y"
+ "H:mm:ss d MMM y", //
+ "EEE, d MMM y 'aha' h:mm:ss a 'hrs'", // "EEE, d MMM y 'aha' H:mm:ss 'hrs'"
+ "EEE, d MMM y 'aha' H:mm:ss 'hrs'", //
+ "EEE, d MMM y 'aha' h'h'mm'm'ss a", // "EEE, d MMM y 'aha' H'h'mm'm'ss"
+ "EEE, d MMM y 'aha' H'h'mm'm'ss", //
+
+ "uuuu-MM-dd h:mm:ss a '+0000'", //
+
+ NULL
+};
+
+static const char * remapResults_en_BE[] = { // rdar://56309604
+ "HH:mm:ss zzzz", // full
+ "HH:mm:ss zzzz", // force24
+ "h:mm:ss a zzzz", // force12
+ "HH:mm:ss z", // long
+ "HH:mm:ss z", // force24
+ "h:mm:ss a z", // force12
+ "HH:mm:ss", // medium
+ "HH:mm:ss", // force24
+ "h:mm:ss a", // force12
+ "HH:mm", // short
+ "HH:mm", // force24
+ "h:mm a", // force12
+ "EEEE, d MMMM y 'at' HH:mm:ss z", // long_df
+ "EEEE, d MMMM y 'at' HH:mm:ss z", // force24
+ "EEEE, d MMMM y 'at' h:mm:ss a z", // force12
+ "dd/MM/y, HH:mm", // short_ds
+ "dd/MM/y, HH:mm", // force24
+ "dd/MM/y, h:mm a", // force12
+
+ "HH:mm:ss", // jmmss
+ "HH:mm:ss", // force24
+ "h:mm:ss a", // force12
+ "HH:mm:ss", // jjmmss
+ "HH:mm:ss", // force24
+ "HH:mm:ss", // force24 | match hour field length
+ "h:mm:ss a", // force12
+ "hh:mm:ss a", // force12 | match hour field length
+ "HH:mm", // Jmm
+ "HH:mm", // force24
+ "hh:mm", // force12
+ "HH:mm:ss v", // jmsv
+ "HH:mm:ss v", // force24
+ "h:mm:ss a v", // force12
+ "HH:mm:ss z", // jmsz
+ "HH:mm:ss z", // force24
+ "h:mm:ss a z", // force12
+
+ "h:mm:ss a", // "h:mm:ss" force12
+ "HH:mm:ss", // force24
+ "a'xx'h:mm:ss d MMM y", // "a'xx'h:mm:ss d MMM y" force12
+ "HH:mm:ss d MMM y", // force24
+ "EEE, d MMM y 'aha' h:mm:ss a 'hrs'", // "EEE, d MMM y 'aha' h:mm:ss a 'hrs'" force12
+ "EEE, d MMM y 'aha' HH:mm:ss 'hrs'", //
+ "EEE, d MMM y 'aha' a'xx'h:mm:ss", // "EEE, d MMM y 'aha' a'xx'h:mm:ss"
+ "EEE, d MMM y 'aha' HH:mm:ss", //
+ "yyMMddhhmmss", // "yyMMddhhmmss" force12
+ "yyMMddHHmmss", //
+
+ "h:mm:ss a", // "H:mm:ss"
+ "H:mm:ss", //
+ "h:mm:ss a d MMM y", // "H:mm:ss d MMM y"
+ "H:mm:ss d MMM y", //
+ "EEE, d MMM y 'aha' h:mm:ss a 'hrs'", // "EEE, d MMM y 'aha' H:mm:ss 'hrs'"
+ "EEE, d MMM y 'aha' H:mm:ss 'hrs'", //
+ "EEE, d MMM y 'aha' h'h'mm'm'ss a", // "EEE, d MMM y 'aha' H'h'mm'm'ss"
+ "EEE, d MMM y 'aha' H'h'mm'm'ss", //
+
+ "uuuu-MM-dd h:mm:ss a '+0000'", //
+
+ NULL
+};
+
+static const char * remapResults_en_BE_japanese[] = { // rdar://56309604
+ "HH:mm:ss zzzz", // full
+ "HH:mm:ss zzzz", // force24
+ "h:mm:ss a zzzz", // force12
+ "HH:mm:ss z", // long
+ "HH:mm:ss z", // force24
+ "h:mm:ss a z", // force12
+ "HH:mm:ss", // medium
+ "HH:mm:ss", // force24
+ "h:mm:ss a", // force12
+ "HH:mm", // short
+ "HH:mm", // force24
+ "h:mm a", // force12
+ "EEEE, d MMMM y G 'at' HH:mm:ss z", // long_df
+ "EEEE, d MMMM y G 'at' HH:mm:ss z", // force24
+ "EEEE, d MMMM y G 'at' h:mm:ss a z", // force12
+ "dd/MM/y GGGGG, HH:mm", // short_ds
+ "dd/MM/y GGGGG, HH:mm", // force24
+ "dd/MM/y GGGGG, h:mm a", // force12
+
+ "HH:mm:ss", // jmmss
+ "HH:mm:ss", // force24
+ "h:mm:ss a", // force12
+ "HH:mm:ss", // jjmmss
+ "HH:mm:ss", // force24
+ "HH:mm:ss", // force24 | match hour field length
+ "h:mm:ss a", // force12
+ "hh:mm:ss a", // force12 | match hour field length
+ "HH:mm", // Jmm
+ "HH:mm", // force24
+ "hh:mm", // force12
+ "HH:mm:ss v", // jmsv
+ "HH:mm:ss v", // force24
+ "h:mm:ss a v", // force12
+ "HH:mm:ss z", // jmsz
+ "HH:mm:ss z", // force24
+ "h:mm:ss a z", // force12
+
+ "h:mm:ss a", // "h:mm:ss" force12
+ "HH:mm:ss", // force24
+ "a'xx'h:mm:ss d MMM y", // "a'xx'h:mm:ss d MMM y" force12
+ "HH:mm:ss d MMM y", // force24
+ "EEE, d MMM y 'aha' h:mm:ss a 'hrs'", // "EEE, d MMM y 'aha' h:mm:ss a 'hrs'" force12
+ "EEE, d MMM y 'aha' HH:mm:ss 'hrs'", //
+ "EEE, d MMM y 'aha' a'xx'h:mm:ss", // "EEE, d MMM y 'aha' a'xx'h:mm:ss"
+ "EEE, d MMM y 'aha' HH:mm:ss", //
+ "yyMMddhhmmss", // "yyMMddhhmmss" force12
+ "yyMMddHHmmss", //
+
+ "h:mm:ss a", // "H:mm:ss"
+ "H:mm:ss", //
+ "h:mm:ss a d MMM y", // "H:mm:ss d MMM y"
+ "H:mm:ss d MMM y", //
+ "EEE, d MMM y 'aha' h:mm:ss a 'hrs'", // "EEE, d MMM y 'aha' H:mm:ss 'hrs'"
+ "EEE, d MMM y 'aha' H:mm:ss 'hrs'", //
+ "EEE, d MMM y 'aha' h'h'mm'm'ss a", // "EEE, d MMM y 'aha' H'h'mm'm'ss"
+ "EEE, d MMM y 'aha' H'h'mm'm'ss", //
+
+ "uuuu-MM-dd h:mm:ss a '+0000'", //
+
+ NULL
+};
+
typedef struct {
const char * locale;
const char ** resultsPtr;
{ "ar", remapResults_ar },
{ "en_IL", remapResults_en_IL },
{ "es_PR@calendar=japanese", remapResults_es_PR_japanese },
+ { "en_IN", remapResults_en_IN },
+ { "en_IN@calendar=japanese", remapResults_en_IN_japanese },
+ { "en_BE", remapResults_en_BE },
+ { "en_BE@calendar=japanese", remapResults_en_BE_japanese },
{ NULL, NULL }
};
static const char * prefLangsMSy[] = { "en_NZ", "en_AU" };
static const char * locsToUseMSa[] = { "en_GB", "en" };
static const char * locsToUseMSb[] = { "en_AU", "en_GB", "en" };
+// For <rdar://problem/55885283>
+static const char * appleLocsMT[] = { "ca-ES", "fi", "nl", "en-US", "hu", "pt-BR", "pl-PL", "it",
+ "ru", "el", "el-GR", "ca", "de-DE", "sv-SE", "tr", "pl",
+ "sv", "tr-TR", "da", "en", "nb", "pt-PT", "nb-NO",
+ "es-ES@collation=traditional", "sl-SI", "cs", "hu-HU",
+ "cs-CZ", "sk", "sl", "de", "da-DK", "es-MX", "vi", "nl-NL",
+ "es", "fi-FI", "fr", "it-IT", "es-ES", "fr-CA", "vi-VN",
+ "pt", "sk-SK", "eu-ES", "ru-RU", "eu", "fr-FR", "unk" };
+static const char * prefLangsMTa[] = { "en" };
+static const char * prefLangsMTb[] = { "he" };
+static const char * locsToUseMTa[] = { "en" };
+static const char * locsToUseMTb[] = { };
typedef struct {
const char * name;
{ "MSay", appleLocsMSa, UPRV_LENGTHOF(appleLocsMSa), prefLangsMSy, UPRV_LENGTHOF(prefLangsMSy), locsToUseMSa, UPRV_LENGTHOF(locsToUseMSa) },
{ "MSbx", appleLocsMSb, UPRV_LENGTHOF(appleLocsMSb), prefLangsMSx, UPRV_LENGTHOF(prefLangsMSx), locsToUseMSb, UPRV_LENGTHOF(locsToUseMSb) },
{ "MSby", appleLocsMSb, UPRV_LENGTHOF(appleLocsMSb), prefLangsMSy, UPRV_LENGTHOF(prefLangsMSy), locsToUseMSb, UPRV_LENGTHOF(locsToUseMSb) },
+ { "MTa", appleLocsMT, UPRV_LENGTHOF(appleLocsMT), prefLangsMTa, UPRV_LENGTHOF(prefLangsMTa), locsToUseMTa, UPRV_LENGTHOF(locsToUseMTa) },
+ { "MTb", appleLocsMT, UPRV_LENGTHOF(appleLocsMT), prefLangsMTb, UPRV_LENGTHOF(prefLangsMTb), locsToUseMTb, UPRV_LENGTHOF(locsToUseMTb) },
{ NULL, NULL, 0, NULL, 0, NULL, 0 }
};
{ (UAMeasureUnit)0, 0, NULL, NULL, NULL, NULL, NULL, NULL }
};
+static const SingleUnitFormat nl_singFmt[] = {
+// unit value wide_2 wide_0 shrt_X shrt_1 narr_0 numr_0 wide_0 narr_0
+ { UAMEASUNIT_TEMPERATURE_CELSIUS, 37.203, "37,20 graden Celsius", "37 graden Celsius", "37,203\\u00A0\\u00B0C", "37,2\\u00A0\\u00B0C", "37\\u00B0", "37\\u00B0", 0,2, 0,2 },
+ { UAMEASUNIT_TEMPERATURE_FAHRENHEIT, 37.203, "37,20 graden Fahrenheit", "37 graden Fahrenheit", "37,203\\u00A0\\u00B0F", "37,2\\u00A0\\u00B0F", "37\\u00B0F", "37\\u00B0", 0,2, 0,2 },
+ { (UAMeasureUnit)0, 0, NULL, NULL, NULL, NULL, NULL, NULL }
+};
+
+static const SingleUnitFormat it_singFmt[] = {
+// unit value wide_2 wide_0 shrt_X shrt_1 narr_0 numr_0 wide_0 narr_0
+ { UAMEASUNIT_DURATION_HOUR, 37.203, "37,20 ore", "37 ore", "37,203 h", "37,2 h", "37 h", "37 h", 0,2, 0,2 },
+ { UAMEASUNIT_DURATION_MINUTE, 37.203, "37,20 minuti", "37 minuti", "37,203 min", "37,2 min", "37 min", "37 min", 0,2, 0,2 },
+ { (UAMeasureUnit)0, 0, NULL, NULL, NULL, NULL, NULL, NULL }
+};
+
+static const SingleUnitFormat nb_singFmt[] = {
+// unit value wide_2 wide_0 shrt_X shrt_1 narr_0 numr_0 wide_0 narr_0
+ { UAMEASUNIT_DURATION_HOUR, 37.203, "37,20 timer", "37 timer", "37,203 t", "37,2 t", "37 t", "37 t", 0,2, 0,2 },
+ { UAMEASUNIT_DURATION_MINUTE, 37.203, "37,20 minutter", "37 minutter", "37,203 min", "37,2 min", "37 m", "37 m", 0,2, 0,2 },
+ { (UAMeasureUnit)0, 0, NULL, NULL, NULL, NULL, NULL, NULL }
+};
+
static const SingleUnitName en_singNam[] = {
// unit wide shrt narr
{ UAMEASUNIT_DURATION_MINUTE, "minutes", "min", "min" },
{ "hr", NULL, NULL, NULL, NULL }, // hr: try plural cases for 1, 2, 5
{ "hu", NULL, NULL, NULL, NULL }, // hu: try plural cases for 1, other
{ "id", NULL, NULL, NULL, NULL }, // id: try plural cases for other only
- { "it", NULL, NULL, NULL, NULL }, // it: try plural cases for 1, other
+ { "it", it_singFmt, NULL, NULL, NULL }, // it: try plural cases for 1, other
{ "ko", NULL, NULL, NULL, NULL }, // ko: try plural cases for other only
{ "ms", NULL, NULL, NULL, NULL }, // ms: try plural cases for other only
- { "nb", NULL, NULL, NULL, NULL }, // nb: try plural cases for 1, other
- { "nl", NULL, NULL, NULL, NULL }, // nl: try plural cases for 1, other
+ { "nb", nb_singFmt, NULL, NULL, NULL }, // nb: try plural cases for 1, other
+ { "nl", nl_singFmt, NULL, NULL, NULL }, // nl: try plural cases for 1, other
{ "pl", NULL, NULL, NULL, NULL }, // pl: try plural cases for 1, 2, 5, 8.5
{ "pt", NULL, NULL, NULL, NULL }, // pt: try plural cases for 1, other
{ "pt_PT", NULL, NULL, NULL, NULL },
static void TestNumberSystemsMultiplier(void); // Apple <rdar://problem/49120648>
static void TestParseScientific(void); // Apple <rdar://problem/39156484>
static void TestCurrForUnkRegion(void); // Apple <rdar://problem/51985640>
+static void TestMinIntMinFracZero(void); // Apple <rdar://problem/54569257>
#if APPLE_ADDITIONS
static void TestFormatDecPerf(void); // Apple <rdar://problem/51672521>
#endif
TESTCASE(TestNumberSystemsMultiplier); // Apple <rdar://problem/49120648>
TESTCASE(TestParseScientific); // Apple <rdar://problem/39156484>
TESTCASE(TestCurrForUnkRegion); // Apple <rdar://problem/51985640>
+ TESTCASE(TestMinIntMinFracZero); // Apple <rdar://problem/54569257>
#if APPLE_ADDITIONS
TESTCASE(TestFormatDecPerf); // Apple <rdar://problem/51672521>
#endif
}
}
+static void TestMinIntMinFracZero(void) {
+ UErrorCode status = U_ZERO_ERROR;
+ UNumberFormat* unum = unum_open(UNUM_DECIMAL, NULL, 0, "en_US", NULL, &status);
+ if ( U_FAILURE(status) ) {
+ log_data_err("unum_open UNUM_DECIMAL for en_US fails with %s\n", u_errorName(status));
+ } else {
+ UChar ubuf[kUBufMax];
+ char bbuf[kBBufMax];
+ int minInt, minFrac, ulen;
+
+ unum_setAttribute(unum, UNUM_MIN_INTEGER_DIGITS, 0);
+ unum_setAttribute(unum, UNUM_MIN_FRACTION_DIGITS, 0);
+ minInt = unum_getAttribute(unum, UNUM_MIN_INTEGER_DIGITS);
+ minFrac = unum_getAttribute(unum, UNUM_MIN_FRACTION_DIGITS);
+ if (minInt != 0 || minFrac != 0) {
+ log_err("after setting minInt=minFrac=0, get minInt %d, minFrac %d\n", minInt, minFrac);
+ }
+ ulen = unum_toPattern(unum, FALSE, ubuf, kUBufMax, &status);
+ if ( U_SUCCESS(status) ) {
+ u_strToUTF8(bbuf, kBBufMax, NULL, ubuf, ulen, &status);
+ log_info("after setting minInt=minFrac=0, pattern (%d): %s\n", ulen, bbuf);
+ }
+
+ status = U_ZERO_ERROR;
+ ulen = unum_formatDouble(unum, 10.0, ubuf, kUBufMax, NULL, &status);
+ if ( U_FAILURE(status) ) {
+ log_err("unum_formatDouble 10.0 ulen %d fails with %s\n", ulen, u_errorName(status));
+ } else if (u_strcmp(ubuf, u"10") != 0) {
+ u_strToUTF8(bbuf, kBBufMax, NULL, ubuf, ulen, &status);
+ log_err("unum_formatDouble 10.0 expected \"10\", got \"%s\"\n", bbuf);
+ }
+
+ status = U_ZERO_ERROR;
+ ulen = unum_formatDouble(unum, 0.9, ubuf, kUBufMax, NULL, &status);
+ if ( U_FAILURE(status) ) {
+ log_err("unum_formatDouble 0.9 ulen %d fails with %s\n", ulen, u_errorName(status));
+ } else if (u_strcmp(ubuf, u".9") != 0) {
+ u_strToUTF8(bbuf, kBBufMax, NULL, ubuf, ulen, &status);
+ log_err("unum_formatDouble 0.9 expected \".9\", got \"%s\"\n", bbuf);
+ }
+
+ status = U_ZERO_ERROR;
+ ulen = unum_formatDouble(unum, 0.0, ubuf, kUBufMax, NULL, &status);
+ if ( U_FAILURE(status) ) {
+ log_err("unum_formatDouble 0.0 ulen %d fails with %s\n", ulen, u_errorName(status));
+ } else if (u_strcmp(ubuf, u"0") != 0) {
+ u_strToUTF8(bbuf, kBBufMax, NULL, ubuf, ulen, &status);
+ log_err("unum_formatDouble 0.0 expected \"0\", got \"%s\"\n", bbuf);
+ }
+
+ unum_close(unum);
+ }
+}
+
#if APPLE_ADDITIONS
#include <stdio.h>
#if U_PLATFORM_IS_DARWIN_BASED
{ "../testdata/encodingSamples/mailExample_Latin1Esc_7.txt", "iso-8859-1" },
{ "../testdata/encodingSamples/mailExample_Latin1Esc_8.txt", "iso-8859-1" },
{ "../testdata/encodingSamples/mailExample_Latin1Esc_9.txt", "iso-8859-1" },
+ // additions for <rdar://problem/56373519>
+ { "../testdata/encodingSamples/mailExample_Latin1_11.txt", "iso-8859-1" },
{ NULL, NULL }
};
} else {
const char *icuName = ucsdet_getName(highestMatch, &status);
int32_t confidence = ucsdet_getConfidence(highestMatch, &status);
+ const char *langCode = ucsdet_getLanguage(highestMatch, &status);
if (U_FAILURE(status) || icuName==NULL) {
log_err("ucsdet_getName and/or ucsdet_getConfidence fails for text file %s: %s\n", testPtr->sampleTextPath, u_errorName(status));
} else {
- log_info("For text file %s: expect %s; get %s with confidence %d, text length %ld\n",
- testPtr->sampleTextPath, testPtr->encodingName, icuName, confidence, sampleTextLen);
+ log_info("For text file %s: expect %s; get %s with confidence %d, langCode %s; text length %ld\n",
+ testPtr->sampleTextPath, testPtr->encodingName, icuName, confidence, langCode, sampleTextLen);
}
}
}
helperTestManyLocaleDurations("is", UMEASFMT_WIDTH_NUMERIC, measures, UPRV_LENGTHOF(measures), "5:37");
helperTestManyLocaleDurations("ja", UMEASFMT_WIDTH_NARROW, measures, UPRV_LENGTHOF(measures), "5\\u6642\\u959337\\u5206");
helperTestManyLocaleDurations("ja", UMEASFMT_WIDTH_NUMERIC, measures, UPRV_LENGTHOF(measures), "5:37");
- helperTestManyLocaleDurations("nb", UMEASFMT_WIDTH_NARROW, measures, UPRV_LENGTHOF(measures), "5t, 37m");
+ helperTestManyLocaleDurations("nb", UMEASFMT_WIDTH_NARROW, measures, UPRV_LENGTHOF(measures), "5 t, 37 m");
helperTestManyLocaleDurations("nb", UMEASFMT_WIDTH_NUMERIC, measures, UPRV_LENGTHOF(measures), "5:37");
helperTestManyLocaleDurations("nl", UMEASFMT_WIDTH_NARROW, measures, UPRV_LENGTHOF(measures), "5 u, 37 m");
helperTestManyLocaleDurations("nl", UMEASFMT_WIDTH_NUMERIC, measures, UPRV_LENGTHOF(measures), "5:37");
u"8.765",
u"0");
- // NOTE: Hungarian is interesting because it has minimumGroupingDigits=4 in locale data
- // If this test breaks due to data changes, find another locale that has minimumGroupingDigits.
+ // NOTE: Hungarian was interesting because it had minimumGroupingDigits=4 in locale data.
+ // Open source has fixed Hungarian to have minimumGroupingDigits=1 and changed this test to
+ // use Polish with minimumGroupingDigits=2. However for now we keep the test using Hungarian
+ // to verify the change.
assertFormatDescendingBig(
u"Hungarian Grouping",
u"group-auto",
Locale("hu"),
u"87 650 000",
u"8 765 000",
- u"876500",
- u"87650",
- u"8765",
+ u"876 500",
+ u"87 650",
+ u"8 765",
u"876,5",
u"87,65",
u"8,765",
Locale("hu"),
u"87 650 000",
u"8 765 000",
- u"876500",
- u"87650",
+ u"876 500",
+ u"87 650",
u"8765",
u"876,5",
u"87,65",
{"es_CO", "1250,75" },
{"es_ES", "1250,75" },
{"es_GQ", "1250,75" },
- {"es_MX", "1250.75" },
+ {"es_MX", "1,250.75" },
{"es_US", "1250.75" },
{"es_VE", "1250,75" },
};