From c5116b9f5a666b9d59f443b3770acd6ef64dc6c3 Mon Sep 17 00:00:00 2001 From: Apple Date: Tue, 24 Mar 2020 21:37:26 +0000 Subject: [PATCH] ICU-64243.0.1.tar.gz --- emojiData/charClasses.txt | 2 +- emojiData/lineClasses.txt | 2 +- icuSources/common/ualoc.cpp | 4 +- icuSources/data/brkitr/rules/char.txt | 2 +- icuSources/data/curr/mni_Mtei.txt | 6 + icuSources/data/curr/sat.txt | 5 + icuSources/data/curr/sat_Deva.txt | 6 + icuSources/data/curr/supplementalData.txt | 6 +- icuSources/data/icu-locale-deprecates.xml | 2 + icuSources/data/lang/mni.txt | 4 + icuSources/data/lang/mni_Mtei.txt | 18 +++ icuSources/data/lang/sat.txt | 17 +++ icuSources/data/lang/sat_Deva.txt | 18 +++ icuSources/data/locales/mni.txt | 5 + icuSources/data/locales/mni_Beng.txt | 5 + icuSources/data/locales/mni_Beng_IN.txt | 5 + icuSources/data/locales/mni_IN.txt | 2 +- icuSources/data/locales/mni_Mtei.txt | 36 ++++++ icuSources/data/locales/mni_Mtei_IN.txt | 5 + icuSources/data/locales/sat.txt | 32 ++++++ icuSources/data/locales/sat_Deva.txt | 34 ++++++ icuSources/data/locales/sat_Deva_IN.txt | 5 + icuSources/data/locales/sat_IN.txt | 5 + icuSources/data/locales/sat_Olck.txt | 5 + icuSources/data/locales/sat_Olck_IN.txt | 5 + icuSources/data/misc/likelySubtags.txt | 2 +- icuSources/data/misc/metadata.txt | 5 +- icuSources/data/misc/supplementalData.txt | 6 +- icuSources/data/region/mni_Mtei.txt | 6 + icuSources/data/region/sat.txt | 5 + icuSources/data/region/sat_Deva.txt | 6 + icuSources/data/unit/ca.txt | 12 +- icuSources/data/unit/cs.txt | 32 +++--- icuSources/data/unit/en_CA.txt | 8 +- icuSources/data/unit/es_MX.txt | 6 +- icuSources/data/unit/es_US.txt | 2 +- icuSources/data/unit/fi.txt | 8 +- icuSources/data/unit/fr_CA.txt | 10 +- icuSources/data/unit/hu.txt | 16 +-- icuSources/data/unit/it.txt | 12 +- icuSources/data/unit/mni_Mtei.txt | 6 + icuSources/data/unit/nb.txt | 8 +- icuSources/data/unit/nn.txt | 8 +- icuSources/data/unit/pt.txt | 8 +- icuSources/data/unit/ro.txt | 18 +-- icuSources/data/unit/ru.txt | 16 +-- icuSources/data/unit/sat.txt | 5 + icuSources/data/unit/sat_Deva.txt | 6 + icuSources/data/unit/sk.txt | 32 +++--- icuSources/data/unit/sv.txt | 12 +- icuSources/data/unit/zh_Hant.txt | 4 +- icuSources/data/zone/mni_Mtei.txt | 6 + icuSources/data/zone/sat.txt | 5 + icuSources/data/zone/sat_Deva.txt | 6 + icuSources/i18n/decimfmt.cpp | 39 +++++++ icuSources/i18n/numfmt.cpp | 13 +++ icuSources/i18n/numparse_compositions.cpp | 9 +- icuSources/i18n/numparse_currency.cpp | 9 +- icuSources/i18n/numparse_currency.h | 1 + icuSources/i18n/numparse_impl.cpp | 17 ++- icuSources/i18n/numparse_types.h | 1 + icuSources/i18n/smpdtfmt.cpp | 13 +-- icuSources/i18n/unicode/decimfmt.h | 12 ++ icuSources/i18n/unicode/numfmt.h | 10 ++ icuSources/test/cintltst/cldrtest.c | 6 +- icuSources/test/cintltst/cloctst.c | 42 +++++++ icuSources/test/cintltst/cmeasureformattest.c | 15 ++- icuSources/test/cintltst/cnumtst.c | 108 +++++++++++++++++- icuSources/test/intltest/numbertest_parse.cpp | 2 +- icuSources/test/intltest/numfmtst.cpp | 6 +- icuSources/tools/icuinfo/icuinfo.cpp | 59 +++++++++- makefile | 52 +++++++-- 72 files changed, 766 insertions(+), 160 deletions(-) create mode 100644 icuSources/data/curr/mni_Mtei.txt create mode 100644 icuSources/data/curr/sat.txt create mode 100644 icuSources/data/curr/sat_Deva.txt create mode 100644 icuSources/data/lang/mni_Mtei.txt create mode 100644 icuSources/data/lang/sat.txt create mode 100644 icuSources/data/lang/sat_Deva.txt create mode 100644 icuSources/data/locales/mni_Beng.txt create mode 100644 icuSources/data/locales/mni_Beng_IN.txt create mode 100644 icuSources/data/locales/mni_Mtei.txt create mode 100644 icuSources/data/locales/mni_Mtei_IN.txt create mode 100644 icuSources/data/locales/sat.txt create mode 100644 icuSources/data/locales/sat_Deva.txt create mode 100644 icuSources/data/locales/sat_Deva_IN.txt create mode 100644 icuSources/data/locales/sat_IN.txt create mode 100644 icuSources/data/locales/sat_Olck.txt create mode 100644 icuSources/data/locales/sat_Olck_IN.txt create mode 100644 icuSources/data/region/mni_Mtei.txt create mode 100644 icuSources/data/region/sat.txt create mode 100644 icuSources/data/region/sat_Deva.txt create mode 100644 icuSources/data/unit/mni_Mtei.txt create mode 100644 icuSources/data/unit/sat.txt create mode 100644 icuSources/data/unit/sat_Deva.txt create mode 100644 icuSources/data/zone/mni_Mtei.txt create mode 100644 icuSources/data/zone/sat.txt create mode 100644 icuSources/data/zone/sat_Deva.txt diff --git a/emojiData/charClasses.txt b/emojiData/charClasses.txt index b50fe1c8..3d171521 100644 --- a/emojiData/charClasses.txt +++ b/emojiData/charClasses.txt @@ -1,4 +1,4 @@ $E_Base = [:EBase:]; $Extended_Pict = [:ExtPict:]; -$E_Base_GAZ = [\U000026F9\U0001F466-\U0001F469]; +$E_Base_GAZ = [\U000026F9\U0001F466-\U0001F469\U0001F91D\U0001F9D1]; $EmojiNRK = [[\p{Emoji}] - [\p{Grapheme_Cluster_Break = Regional_Indicator}*\u00230-9©®™〰〽]]; diff --git a/emojiData/lineClasses.txt b/emojiData/lineClasses.txt index dc2fbdcf..0333ef75 100644 --- a/emojiData/lineClasses.txt +++ b/emojiData/lineClasses.txt @@ -1,3 +1,3 @@ -$EB = [[:LineBreak = EB:] \U0001F46A-\U0001F46D\U0001F46F\U0001F91D\U0001F93C]; +$EB = [:LineBreak = EB:]; $EmojiNRK = [[\p{Emoji}] - [$RI \u002a\u00230-9©®™〰〽]]; $Extended_Pict = [:ExtPict:]; diff --git a/icuSources/common/ualoc.cpp b/icuSources/common/ualoc.cpp index da0237c2..e22121f0 100644 --- a/icuSources/common/ualoc.cpp +++ b/icuSources/common/ualoc.cpp @@ -571,8 +571,8 @@ static LocParentAndDistance locParentMap[] = { enum { kLocParentMapCount = UPRV_LENGTHOF(locParentMap), kMaxParentDistance = 8 }; enum { - kStringsAllocSize = 5248, // cannot expand; current actual usage 5102 - kParentMapInitCount = 272 // can expand; current actual usage 251 + kStringsAllocSize = 5280, // cannot expand; current actual usage 5259 + kParentMapInitCount = 272 // can expand; current actual usage 254 }; U_CDECL_BEGIN diff --git a/icuSources/data/brkitr/rules/char.txt b/icuSources/data/brkitr/rules/char.txt index 72c1abf7..0db29635 100644 --- a/icuSources/data/brkitr/rules/char.txt +++ b/icuSources/data/brkitr/rules/char.txt @@ -47,7 +47,7 @@ $Extended_Pict = [:ExtPict:]; # $E_Base_GAZ = [\p{Grapheme_Cluster_Break = EBG}]; # They must be replaced with updated versions as follows # $E_Base = [:EBase:]; -# $E_Base_GAZ = [\U000026F9\U0001F466-\U0001F469]; # EBase that also occur after ZWJ in emoji-zwj-sequences +# $E_Base_GAZ = [\U000026F9\U0001F466-\U0001F469\U0001F91D\U0001F9D1]; # EBase that also occur after ZWJ in emoji-zwj-sequences ## ------------------------------------------------- !!chain; diff --git a/icuSources/data/curr/mni_Mtei.txt b/icuSources/data/curr/mni_Mtei.txt new file mode 100644 index 00000000..1ce616f3 --- /dev/null +++ b/icuSources/data/curr/mni_Mtei.txt @@ -0,0 +1,6 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html#License +mni_Mtei{ + %%Parent{"root"} + Version{"2.1.48.13"} +} diff --git a/icuSources/data/curr/sat.txt b/icuSources/data/curr/sat.txt new file mode 100644 index 00000000..d47ac410 --- /dev/null +++ b/icuSources/data/curr/sat.txt @@ -0,0 +1,5 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html#License +sat{ + Version{"2.1.48.13"} +} diff --git a/icuSources/data/curr/sat_Deva.txt b/icuSources/data/curr/sat_Deva.txt new file mode 100644 index 00000000..1855c87d --- /dev/null +++ b/icuSources/data/curr/sat_Deva.txt @@ -0,0 +1,6 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html#License +sat_Deva{ + %%Parent{"root"} + Version{"2.1.48.13"} +} diff --git a/icuSources/data/curr/supplementalData.txt b/icuSources/data/curr/supplementalData.txt index 7f1c6751..59e7de81 100644 --- a/icuSources/data/curr/supplementalData.txt +++ b/icuSources/data/curr/supplementalData.txt @@ -4845,7 +4845,7 @@ supplementalData:table(nofallback){ 0, } COP:intvector{ - 2, + 0, 0, 0, 0, @@ -4905,7 +4905,7 @@ supplementalData:table(nofallback){ 0, } IDR:intvector{ - 2, + 0, 0, 0, 0, @@ -5043,7 +5043,7 @@ supplementalData:table(nofallback){ 0, } PKR:intvector{ - 2, + 0, 0, 0, 0, diff --git a/icuSources/data/icu-locale-deprecates.xml b/icuSources/data/icu-locale-deprecates.xml index d2ec7416..b06120e8 100644 --- a/icuSources/data/icu-locale-deprecates.xml +++ b/icuSources/data/icu-locale-deprecates.xml @@ -23,12 +23,14 @@ + + diff --git a/icuSources/data/lang/mni.txt b/icuSources/data/lang/mni.txt index 07bd0471..d34da126 100644 --- a/icuSources/data/lang/mni.txt +++ b/icuSources/data/lang/mni.txt @@ -4,6 +4,10 @@ mni{ Languages{ mni{"মৈতৈলোন্"} } + Scripts{ + Beng{"বাংলা"} + Mtei{"মেইটেই মায়েক"} + } Version{"2.1.48.13"} localeDisplayPattern{ keyTypePattern{"{0}: {1}"} diff --git a/icuSources/data/lang/mni_Mtei.txt b/icuSources/data/lang/mni_Mtei.txt new file mode 100644 index 00000000..b7eb4670 --- /dev/null +++ b/icuSources/data/lang/mni_Mtei.txt @@ -0,0 +1,18 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html#License +mni_Mtei{ + %%Parent{"root"} + Languages{ + mni{"ꯃꯤꯇꯩꯂꯣꯟ"} + } + Scripts{ + Beng{"ꯕꯪꯂꯥ"} + Mtei{"ꯃꯤꯇꯩ ꯃꯌꯦꯛ"} + } + Version{"2.1.48.13"} + localeDisplayPattern{ + keyTypePattern{"{0}: {1}"} + pattern{"{0} ({1})"} + separator{"{0}, {1}"} + } +} diff --git a/icuSources/data/lang/sat.txt b/icuSources/data/lang/sat.txt new file mode 100644 index 00000000..a2a50cbe --- /dev/null +++ b/icuSources/data/lang/sat.txt @@ -0,0 +1,17 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html#License +sat{ + Languages{ + sat{"ᱥᱟᱱᱛᱟᱲᱤ"} + } + Scripts{ + Deva{"ᱫᱮᱣᱟᱱᱟᱜᱟᱨᱤ"} + Olck{"ᱚᱞ ᱪᱤᱠᱤ"} + } + Version{"2.1.48.13"} + localeDisplayPattern{ + keyTypePattern{"{0}: {1}"} + pattern{"{0} ({1})"} + separator{"{0}, {1}"} + } +} diff --git a/icuSources/data/lang/sat_Deva.txt b/icuSources/data/lang/sat_Deva.txt new file mode 100644 index 00000000..dcf4b6ee --- /dev/null +++ b/icuSources/data/lang/sat_Deva.txt @@ -0,0 +1,18 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html#License +sat_Deva{ + %%Parent{"root"} + Languages{ + sat{"सानताड़ी"} + } + Scripts{ + Deva{"देवानागारी"} + Olck{"अल चीकी"} + } + Version{"2.1.48.13"} + localeDisplayPattern{ + keyTypePattern{"{0}: {1}"} + pattern{"{0} ({1})"} + separator{"{0}, {1}"} + } +} diff --git a/icuSources/data/locales/mni.txt b/icuSources/data/locales/mni.txt index 04e09b4c..6373c691 100644 --- a/icuSources/data/locales/mni.txt +++ b/icuSources/data/locales/mni.txt @@ -7,6 +7,11 @@ mni{ " ঢ {ঢ\u09BC} ণ ত থ দ ধ ন প ফ ব ভ ম য {য\u09BC} র ল ৱ শ ষ স হ া ি ী \u09C1 " "\u09C2 \u09C3 ে ৈ ো ৌ \u09CD]" } + ExemplarCharactersNumbers{"[\\- , . % ‰ + 0০ 1১ 2২ 3৩ 4৪ 5৫ 6৬ 7৭ 8৮ 9৯]"} + ExemplarCharactersPunctuation{ + "[\\- ‐ – — , ; \\: ! ? . … ' ‘ ’ \u0022 “ ” ( ) \\[ \\] § @ * / \\& # † ‡ ′ " + "″]" + } NumberElements{ default{"beng"} } diff --git a/icuSources/data/locales/mni_Beng.txt b/icuSources/data/locales/mni_Beng.txt new file mode 100644 index 00000000..1414c257 --- /dev/null +++ b/icuSources/data/locales/mni_Beng.txt @@ -0,0 +1,5 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html#License +mni_Beng{ + Version{"2.1.48.13"} +} diff --git a/icuSources/data/locales/mni_Beng_IN.txt b/icuSources/data/locales/mni_Beng_IN.txt new file mode 100644 index 00000000..1959e5a7 --- /dev/null +++ b/icuSources/data/locales/mni_Beng_IN.txt @@ -0,0 +1,5 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html#License +mni_Beng_IN{ + Version{"2.1.48.13"} +} diff --git a/icuSources/data/locales/mni_IN.txt b/icuSources/data/locales/mni_IN.txt index 23140657..00d8c00a 100644 --- a/icuSources/data/locales/mni_IN.txt +++ b/icuSources/data/locales/mni_IN.txt @@ -1,5 +1,5 @@ // © 2016 and later: Unicode, Inc. and others. // License & terms of use: http://www.unicode.org/copyright.html#License mni_IN{ - Version{"2.1.48.13"} + "%%ALIAS"{"mni_Beng_IN"} } diff --git a/icuSources/data/locales/mni_Mtei.txt b/icuSources/data/locales/mni_Mtei.txt new file mode 100644 index 00000000..14819716 --- /dev/null +++ b/icuSources/data/locales/mni_Mtei.txt @@ -0,0 +1,36 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html#License +mni_Mtei{ + %%Parent{"root"} + ExemplarCharacters{ + "[ꯀ ꯁ ꯂ ꯃ ꯄ ꯅ ꯆ ꯇ ꯈ ꯉ ꯊ ꯋ ꯌ ꯍ ꯎ ꯏ ꯐ ꯑ ꯒ ꯓ ꯔ ꯕ ꯖ ꯗ ꯘ ꯙ ꯚ ꯛ ꯜ ꯝ ꯞ ꯟ ꯠ ꯡ ꯢ " + "\uABE3 \uABE4 \uABE5 \uABE6 \uABE7 \uABE8 \uABE9 \uABEA]" + } + ExemplarCharactersNumbers{"[\\- , . % + 0꯰ 1꯱ 2꯲ 3꯳ 4꯴ 5꯵ 6꯶ 7꯷ 8꯸ 9꯹]"} + ExemplarCharactersPunctuation{ + "[\\- , ; \\: ! ? . … ' \u0022 ( ) \\[ \\] @ * / \\& # ꯫ \uABEC \uABED]" + } + NumberElements{ + default{"mtei"} + } + Version{"2.1.48.13"} + calendar{ + gregorian{ + DateTimePatterns{ + "h.mm.ss a zzzz", + "h.mm.ss a z", + "h.mm.ss a", + "h.mm. a", + "EEEE, d MMMM, y", + "d MMMM, y", + "dd-MM-y", + "d-M-y", + "{1} {0}", + "{1} {0}", + "{1} {0}", + "{1} {0}", + "{1} {0}", + } + } + } +} diff --git a/icuSources/data/locales/mni_Mtei_IN.txt b/icuSources/data/locales/mni_Mtei_IN.txt new file mode 100644 index 00000000..457ba8c7 --- /dev/null +++ b/icuSources/data/locales/mni_Mtei_IN.txt @@ -0,0 +1,5 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html#License +mni_Mtei_IN{ + Version{"2.1.48.13"} +} diff --git a/icuSources/data/locales/sat.txt b/icuSources/data/locales/sat.txt new file mode 100644 index 00000000..b5c5006b --- /dev/null +++ b/icuSources/data/locales/sat.txt @@ -0,0 +1,32 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html#License +sat{ + ExemplarCharacters{ + "[ᱚ ᱛ ᱜ ᱝ ᱞ ᱟ ᱠ ᱡ ᱢ ᱣ ᱤ ᱥ ᱦ ᱧ ᱨ ᱩ ᱪ ᱫ ᱬ ᱭ ᱮ ᱯ ᱰ ᱱ ᱲ ᱳ ᱴ ᱵ ᱶ ᱷ ᱸ ᱹ ᱺ ᱻ ᱼ ᱽ]" + } + ExemplarCharactersNumbers{"[\\- , . % + 0᱐ 1᱑ 2᱒ 3᱓ 4᱔ 5᱕ 6᱖ 7᱗ 8᱘ 9᱙]"} + ExemplarCharactersPunctuation{"[, ! ? ' ‘ ’ \u0022 “ ” ᱾ ᱿]"} + NumberElements{ + default{"olck"} + } + Version{"2.1.48.13"} + calendar{ + gregorian{ + DateTimePatterns{ + "h:mm:ss a zzzz", + "h:mm:ss a z", + "h:mm:ss a", + "h:mm a", + "EEEE, d MMMM y", + "d MMMM y", + "d MMM y", + "d/M/yy", + "{1} {0}", + "{1} {0}", + "{1} {0}", + "{1} {0}", + "{1} {0}", + } + } + } +} diff --git a/icuSources/data/locales/sat_Deva.txt b/icuSources/data/locales/sat_Deva.txt new file mode 100644 index 00000000..7cd62145 --- /dev/null +++ b/icuSources/data/locales/sat_Deva.txt @@ -0,0 +1,34 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html#License +sat_Deva{ + %%Parent{"root"} + ExemplarCharacters{ + "[\u093C \u0902 अ आ ई उ ए ओ क ग च ज ञ ट ड ण त द न प ब म य र ल व स ह \u093E" + "\u0940 \u0941 \u0947 \u094B]" + } + ExemplarCharactersNumbers{"[\\- , . % ‰ + 0० 1१ 2२ 3३ 4४ 5५ 6६ 7७ 8८ 9९]"} + ExemplarCharactersPunctuation{"[\\- , ; \\: ! ? . ‘ ’ “ ” ( ) \\[ \\] \\{ \\} ॰]"} + NumberElements{ + default{"deva"} + } + Version{"2.1.48.13"} + calendar{ + gregorian{ + DateTimePatterns{ + "h:mm:ss a zzzz", + "h:mm:ss a z", + "h:mm:ss a", + "h:mm a", + "EEEE, d MMMM y", + "d MMMM y", + "d MMM y", + "d/M/yy", + "{1} {0}", + "{1} {0}", + "{1} {0}", + "{1} {0}", + "{1} {0}", + } + } + } +} diff --git a/icuSources/data/locales/sat_Deva_IN.txt b/icuSources/data/locales/sat_Deva_IN.txt new file mode 100644 index 00000000..8da82826 --- /dev/null +++ b/icuSources/data/locales/sat_Deva_IN.txt @@ -0,0 +1,5 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html#License +sat_Deva_IN{ + Version{"2.1.48.13"} +} diff --git a/icuSources/data/locales/sat_IN.txt b/icuSources/data/locales/sat_IN.txt new file mode 100644 index 00000000..c4976b4d --- /dev/null +++ b/icuSources/data/locales/sat_IN.txt @@ -0,0 +1,5 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html#License +sat_IN{ + "%%ALIAS"{"sat_Olck_IN"} +} diff --git a/icuSources/data/locales/sat_Olck.txt b/icuSources/data/locales/sat_Olck.txt new file mode 100644 index 00000000..c579a7e0 --- /dev/null +++ b/icuSources/data/locales/sat_Olck.txt @@ -0,0 +1,5 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html#License +sat_Olck{ + Version{"2.1.48.13"} +} diff --git a/icuSources/data/locales/sat_Olck_IN.txt b/icuSources/data/locales/sat_Olck_IN.txt new file mode 100644 index 00000000..43d59591 --- /dev/null +++ b/icuSources/data/locales/sat_Olck_IN.txt @@ -0,0 +1,5 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html#License +sat_Olck_IN{ + Version{"2.1.48.13"} +} diff --git a/icuSources/data/misc/likelySubtags.txt b/icuSources/data/misc/likelySubtags.txt index a23c5049..c180f15d 100644 --- a/icuSources/data/misc/likelySubtags.txt +++ b/icuSources/data/misc/likelySubtags.txt @@ -1041,7 +1041,7 @@ likelySubtags:table(nofallback){ sah{"sah_Cyrl_RU"} saq{"saq_Latn_KE"} sas{"sas_Latn_ID"} - sat{"sat_Latn_IN"} + sat{"sat_Olck_IN"} sav{"sav_Latn_SN"} saz{"saz_Saur_IN"} sba{"sba_Latn_ZZ"} diff --git a/icuSources/data/misc/metadata.txt b/icuSources/data/misc/metadata.txt index 239591cd..97248588 100644 --- a/icuSources/data/misc/metadata.txt +++ b/icuSources/data/misc/metadata.txt @@ -4996,7 +4996,8 @@ metadata:table(nofallback){ "ml_IN", "mn_MN", "mn_Mong_CN", - "mni_IN", + "mni_Beng", + "mni_Beng_IN", "moh_CA", "mr_IN", "ms_Arab_MY", @@ -5044,6 +5045,8 @@ metadata:table(nofallback){ "sa_IN", "sah_RU", "saq_KE", + "sat_Olck", + "sat_Olck_IN", "sbp_TZ", "sc_IT", "scn_IT", diff --git a/icuSources/data/misc/supplementalData.txt b/icuSources/data/misc/supplementalData.txt index 07f75b16..1b385a37 100644 --- a/icuSources/data/misc/supplementalData.txt +++ b/icuSources/data/misc/supplementalData.txt @@ -15792,13 +15792,13 @@ supplementalData:table(nofallback){ } sat{ primary{ - scripts{"Latn"} + scripts{"Olck"} } secondary{ scripts{ "Beng", "Deva", - "Olck", + "Latn", "Orya", } territories{"IN"} @@ -19451,8 +19451,10 @@ supplementalData:table(nofallback){ "ky_Latn", "ml_Arab", "mn_Mong", + "mni_Mtei", "ms_Arab", "pa_Arab", + "sat_Deva", "sd_Deva", "sd_Khoj", "sd_Sind", diff --git a/icuSources/data/region/mni_Mtei.txt b/icuSources/data/region/mni_Mtei.txt new file mode 100644 index 00000000..1ce616f3 --- /dev/null +++ b/icuSources/data/region/mni_Mtei.txt @@ -0,0 +1,6 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html#License +mni_Mtei{ + %%Parent{"root"} + Version{"2.1.48.13"} +} diff --git a/icuSources/data/region/sat.txt b/icuSources/data/region/sat.txt new file mode 100644 index 00000000..d47ac410 --- /dev/null +++ b/icuSources/data/region/sat.txt @@ -0,0 +1,5 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html#License +sat{ + Version{"2.1.48.13"} +} diff --git a/icuSources/data/region/sat_Deva.txt b/icuSources/data/region/sat_Deva.txt new file mode 100644 index 00000000..1855c87d --- /dev/null +++ b/icuSources/data/region/sat_Deva.txt @@ -0,0 +1,6 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html#License +sat_Deva{ + %%Parent{"root"} + Version{"2.1.48.13"} +} diff --git a/icuSources/data/unit/ca.txt b/icuSources/data/unit/ca.txt index 3bfba96b..78f87fed 100644 --- a/icuSources/data/unit/ca.txt +++ b/icuSources/data/unit/ca.txt @@ -1156,8 +1156,8 @@ ca{ temperature{ celsius{ dnam{"°C"} - one{"{0} °C"} - other{"{0} °C"} + one{"{0} °C"} + other{"{0} °C"} } fahrenheit{ dnam{"°F"} @@ -1855,13 +1855,13 @@ ca{ temperature{ celsius{ dnam{"°C"} - one{"{0} °C"} - other{"{0} °C"} + one{"{0} °C"} + other{"{0} °C"} } fahrenheit{ dnam{"°F"} - one{"{0} °F"} - other{"{0} °F"} + one{"{0} °F"} + other{"{0} °F"} } generic{ dnam{"°"} diff --git a/icuSources/data/unit/cs.txt b/icuSources/data/unit/cs.txt index a1fbdea1..1863faf3 100644 --- a/icuSources/data/unit/cs.txt +++ b/icuSources/data/unit/cs.txt @@ -1914,17 +1914,17 @@ cs{ temperature{ celsius{ dnam{"°C"} - few{"{0} °C"} - many{"{0} °C"} - one{"{0} °C"} - other{"{0} °C"} + few{"{0} °C"} + many{"{0} °C"} + one{"{0} °C"} + other{"{0} °C"} } fahrenheit{ dnam{"°F"} - few{"{0} °F"} - many{"{0} °F"} - one{"{0} °F"} - other{"{0} °F"} + few{"{0} °F"} + many{"{0} °F"} + one{"{0} °F"} + other{"{0} °F"} } generic{ dnam{"°"} @@ -3026,17 +3026,17 @@ cs{ temperature{ celsius{ dnam{"°C"} - few{"{0} °C"} - many{"{0} °C"} - one{"{0} °C"} - other{"{0} °C"} + few{"{0} °C"} + many{"{0} °C"} + one{"{0} °C"} + other{"{0} °C"} } fahrenheit{ dnam{"°F"} - few{"{0} °F"} - many{"{0} °F"} - one{"{0} °F"} - other{"{0} °F"} + few{"{0} °F"} + many{"{0} °F"} + one{"{0} °F"} + other{"{0} °F"} } generic{ dnam{"°"} diff --git a/icuSources/data/unit/en_CA.txt b/icuSources/data/unit/en_CA.txt index 7e909df3..703216d8 100644 --- a/icuSources/data/unit/en_CA.txt +++ b/icuSources/data/unit/en_CA.txt @@ -416,12 +416,12 @@ en_CA{ } temperature{ celsius{ - one{"{0} °C"} - other{"{0} °C"} + one{"{0} °C"} + other{"{0} °C"} } fahrenheit{ - one{"{0} °F"} - other{"{0} °F"} + one{"{0} °F"} + other{"{0} °F"} } } volume{ diff --git a/icuSources/data/unit/es_MX.txt b/icuSources/data/unit/es_MX.txt index 0fc9da9a..ab99fa8d 100644 --- a/icuSources/data/unit/es_MX.txt +++ b/icuSources/data/unit/es_MX.txt @@ -191,8 +191,8 @@ es_MX{ } temperature{ celsius{ - one{"{0} °C"} - other{"{0} °C"} + one{"{0} °C"} + other{"{0} °C"} } } } @@ -333,7 +333,7 @@ es_MX{ } temperature{ celsius{ - one{"{0} °C"} + one{"{0} °C"} } } torque{ diff --git a/icuSources/data/unit/es_US.txt b/icuSources/data/unit/es_US.txt index 32d09989..78e33dcf 100644 --- a/icuSources/data/unit/es_US.txt +++ b/icuSources/data/unit/es_US.txt @@ -198,7 +198,7 @@ es_US{ } temperature{ celsius{ - one{"{0} °C"} + one{"{0} °C"} } } volume{ diff --git a/icuSources/data/unit/fi.txt b/icuSources/data/unit/fi.txt index 8047b42b..1f008c45 100644 --- a/icuSources/data/unit/fi.txt +++ b/icuSources/data/unit/fi.txt @@ -2300,13 +2300,13 @@ fi{ temperature{ celsius{ dnam{"°C"} - one{"{0} °C"} - other{"{0} °C"} + one{"{0} °C"} + other{"{0} °C"} } fahrenheit{ dnam{"°F"} - one{"{0} °F"} - other{"{0} °F"} + one{"{0} °F"} + other{"{0} °F"} } generic{ dnam{"°"} diff --git a/icuSources/data/unit/fr_CA.txt b/icuSources/data/unit/fr_CA.txt index b8b872ce..d64cdb8b 100644 --- a/icuSources/data/unit/fr_CA.txt +++ b/icuSources/data/unit/fr_CA.txt @@ -661,7 +661,7 @@ fr_CA{ celsius{ dnam{"°C"} one{"{0} °C"} - other{"{0} °C"} + other{"{0} °C"} } generic{ dnam{"°"} @@ -1106,12 +1106,12 @@ fr_CA{ } temperature{ celsius{ - one{"{0} °C"} - other{"{0} °C"} + one{"{0} °C"} + other{"{0} °C"} } fahrenheit{ - one{"{0} °F"} - other{"{0} °F"} + one{"{0} °F"} + other{"{0} °F"} } generic{ one{"{0}°"} diff --git a/icuSources/data/unit/hu.txt b/icuSources/data/unit/hu.txt index b0b80239..eecf9815 100644 --- a/icuSources/data/unit/hu.txt +++ b/icuSources/data/unit/hu.txt @@ -1093,12 +1093,12 @@ hu{ temperature{ celsius{ dnam{"°C"} - one{"{0} °C"} - other{"{0} °C"} + one{"{0} °C"} + other{"{0} °C"} } fahrenheit{ - one{"{0} °F"} - other{"{0} °F"} + one{"{0} °F"} + other{"{0} °F"} } } volume{ @@ -1781,13 +1781,13 @@ hu{ temperature{ celsius{ dnam{"°C"} - one{"{0} °C"} - other{"{0} °C"} + one{"{0} °C"} + other{"{0} °C"} } fahrenheit{ dnam{"°F"} - one{"{0} °F"} - other{"{0} °F"} + one{"{0} °F"} + other{"{0} °F"} } generic{ dnam{"°"} diff --git a/icuSources/data/unit/it.txt b/icuSources/data/unit/it.txt index 1608348a..545b501b 100644 --- a/icuSources/data/unit/it.txt +++ b/icuSources/data/unit/it.txt @@ -1077,8 +1077,8 @@ it{ temperature{ celsius{ dnam{"°C"} - one{"{0} °C"} - other{"{0} °C"} + one{"{0} °C"} + other{"{0} °C"} } } volume{ @@ -1771,13 +1771,13 @@ it{ temperature{ celsius{ dnam{"°C"} - one{"{0} °C"} - other{"{0} °C"} + one{"{0} °C"} + other{"{0} °C"} } fahrenheit{ dnam{"°F"} - one{"{0} °F"} - other{"{0} °F"} + one{"{0} °F"} + other{"{0} °F"} } generic{ dnam{"°"} diff --git a/icuSources/data/unit/mni_Mtei.txt b/icuSources/data/unit/mni_Mtei.txt new file mode 100644 index 00000000..1ce616f3 --- /dev/null +++ b/icuSources/data/unit/mni_Mtei.txt @@ -0,0 +1,6 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html#License +mni_Mtei{ + %%Parent{"root"} + Version{"2.1.48.13"} +} diff --git a/icuSources/data/unit/nb.txt b/icuSources/data/unit/nb.txt index 4bf35a87..592331fd 100644 --- a/icuSources/data/unit/nb.txt +++ b/icuSources/data/unit/nb.txt @@ -1869,13 +1869,13 @@ nb{ temperature{ celsius{ dnam{"°C"} - one{"{0} °C"} - other{"{0} °C"} + one{"{0} °C"} + other{"{0} °C"} } fahrenheit{ dnam{"°F"} - one{"{0} °F"} - other{"{0} °F"} + one{"{0} °F"} + other{"{0} °F"} } generic{ dnam{"°"} diff --git a/icuSources/data/unit/nn.txt b/icuSources/data/unit/nn.txt index 472aad9c..f9bd4503 100644 --- a/icuSources/data/unit/nn.txt +++ b/icuSources/data/unit/nn.txt @@ -1450,13 +1450,13 @@ nn{ temperature{ celsius{ dnam{"°C"} - one{"{0} °C"} - other{"{0} °C"} + one{"{0} °C"} + other{"{0} °C"} } fahrenheit{ dnam{"°F"} - one{"{0} °F"} - other{"{0} °F"} + one{"{0} °F"} + other{"{0} °F"} } generic{ dnam{"°"} diff --git a/icuSources/data/unit/pt.txt b/icuSources/data/unit/pt.txt index a63e563a..c004831a 100644 --- a/icuSources/data/unit/pt.txt +++ b/icuSources/data/unit/pt.txt @@ -1591,13 +1591,13 @@ pt{ temperature{ celsius{ dnam{"graus C"} - one{"{0} °C"} - other{"{0} °C"} + one{"{0} °C"} + other{"{0} °C"} } fahrenheit{ dnam{"graus F"} - one{"{0} °F"} - other{"{0} °F"} + one{"{0} °F"} + other{"{0} °F"} } } torque{ diff --git a/icuSources/data/unit/ro.txt b/icuSources/data/unit/ro.txt index 778be97c..892b6e5c 100644 --- a/icuSources/data/unit/ro.txt +++ b/icuSources/data/unit/ro.txt @@ -1221,9 +1221,9 @@ ro{ temperature{ celsius{ dnam{"°C"} - few{"{0} °C"} - one{"{0} °C"} - other{"{0} °C"} + few{"{0} °C"} + one{"{0} °C"} + other{"{0} °C"} } } volume{ @@ -1991,15 +1991,15 @@ ro{ temperature{ celsius{ dnam{"°C"} - few{"{0} °C"} - one{"{0} °C"} - other{"{0} °C"} + few{"{0} °C"} + one{"{0} °C"} + other{"{0} °C"} } fahrenheit{ dnam{"°F"} - few{"{0} °F"} - one{"{0} °F"} - other{"{0} °F"} + few{"{0} °F"} + one{"{0} °F"} + other{"{0} °F"} } generic{ dnam{"°"} diff --git a/icuSources/data/unit/ru.txt b/icuSources/data/unit/ru.txt index d89452c3..0c67b19b 100644 --- a/icuSources/data/unit/ru.txt +++ b/icuSources/data/unit/ru.txt @@ -1686,10 +1686,10 @@ ru{ temperature{ celsius{ dnam{"°C"} - few{"{0} °C"} - many{"{0} °C"} - one{"{0} °C"} - other{"{0} °C"} + few{"{0} °C"} + many{"{0} °C"} + one{"{0} °C"} + other{"{0} °C"} } } volume{ @@ -2644,10 +2644,10 @@ ru{ temperature{ celsius{ dnam{"°C"} - few{"{0} °C"} - many{"{0} °C"} - one{"{0} °C"} - other{"{0} °C"} + few{"{0} °C"} + many{"{0} °C"} + one{"{0} °C"} + other{"{0} °C"} } fahrenheit{ dnam{"°F"} diff --git a/icuSources/data/unit/sat.txt b/icuSources/data/unit/sat.txt new file mode 100644 index 00000000..d47ac410 --- /dev/null +++ b/icuSources/data/unit/sat.txt @@ -0,0 +1,5 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html#License +sat{ + Version{"2.1.48.13"} +} diff --git a/icuSources/data/unit/sat_Deva.txt b/icuSources/data/unit/sat_Deva.txt new file mode 100644 index 00000000..1855c87d --- /dev/null +++ b/icuSources/data/unit/sat_Deva.txt @@ -0,0 +1,6 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html#License +sat_Deva{ + %%Parent{"root"} + Version{"2.1.48.13"} +} diff --git a/icuSources/data/unit/sk.txt b/icuSources/data/unit/sk.txt index 979f1243..7e8900bf 100644 --- a/icuSources/data/unit/sk.txt +++ b/icuSources/data/unit/sk.txt @@ -1598,16 +1598,16 @@ sk{ temperature{ celsius{ dnam{"°C"} - few{"{0} °C"} - many{"{0} °C"} - one{"{0} °C"} - other{"{0} °C"} + few{"{0} °C"} + many{"{0} °C"} + one{"{0} °C"} + other{"{0} °C"} } fahrenheit{ - few{"{0} °F"} - many{"{0} °F"} - one{"{0} °F"} - other{"{0} °F"} + few{"{0} °F"} + many{"{0} °F"} + one{"{0} °F"} + other{"{0} °F"} } generic{ few{"{0} °"} @@ -2602,17 +2602,17 @@ sk{ temperature{ celsius{ dnam{"°C"} - few{"{0} °C"} - many{"{0} °C"} - one{"{0} °C"} - other{"{0} °C"} + few{"{0} °C"} + many{"{0} °C"} + one{"{0} °C"} + other{"{0} °C"} } fahrenheit{ dnam{"°F"} - few{"{0} °F"} - many{"{0} °F"} - one{"{0} °F"} - other{"{0} °F"} + few{"{0} °F"} + many{"{0} °F"} + one{"{0} °F"} + other{"{0} °F"} } generic{ dnam{"°"} diff --git a/icuSources/data/unit/sv.txt b/icuSources/data/unit/sv.txt index 71ee2332..3f04c76e 100644 --- a/icuSources/data/unit/sv.txt +++ b/icuSources/data/unit/sv.txt @@ -1494,8 +1494,8 @@ sv{ temperature{ celsius{ dnam{"°C"} - one{"{0} °C"} - other{"{0} °C"} + one{"{0} °C"} + other{"{0} °C"} } fahrenheit{ dnam{"°F"} @@ -2347,13 +2347,13 @@ sv{ temperature{ celsius{ dnam{"°C"} - one{"{0} °C"} - other{"{0} °C"} + one{"{0} °C"} + other{"{0} °C"} } fahrenheit{ dnam{"°F"} - one{"{0} °F"} - other{"{0} °F"} + one{"{0} °F"} + other{"{0} °F"} } generic{ dnam{"°"} diff --git a/icuSources/data/unit/zh_Hant.txt b/icuSources/data/unit/zh_Hant.txt index 1e58d890..b5bdbcc2 100644 --- a/icuSources/data/unit/zh_Hant.txt +++ b/icuSources/data/unit/zh_Hant.txt @@ -736,7 +736,7 @@ zh_Hant{ } degree{ dnam{"角度"} - other{"{0}度"} + other{"{0}°"} } radian{ dnam{"弧度"} @@ -1327,7 +1327,7 @@ zh_Hant{ } degree{ dnam{"角度"} - other{"{0}度"} + other{"{0}°"} } radian{ dnam{"弧度"} diff --git a/icuSources/data/zone/mni_Mtei.txt b/icuSources/data/zone/mni_Mtei.txt new file mode 100644 index 00000000..1ce616f3 --- /dev/null +++ b/icuSources/data/zone/mni_Mtei.txt @@ -0,0 +1,6 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html#License +mni_Mtei{ + %%Parent{"root"} + Version{"2.1.48.13"} +} diff --git a/icuSources/data/zone/sat.txt b/icuSources/data/zone/sat.txt new file mode 100644 index 00000000..d47ac410 --- /dev/null +++ b/icuSources/data/zone/sat.txt @@ -0,0 +1,5 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html#License +sat{ + Version{"2.1.48.13"} +} diff --git a/icuSources/data/zone/sat_Deva.txt b/icuSources/data/zone/sat_Deva.txt new file mode 100644 index 00000000..1855c87d --- /dev/null +++ b/icuSources/data/zone/sat_Deva.txt @@ -0,0 +1,6 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html#License +sat_Deva{ + %%Parent{"root"} + Version{"2.1.48.13"} +} diff --git a/icuSources/i18n/decimfmt.cpp b/icuSources/i18n/decimfmt.cpp index 37ba1fa1..bb3e0bb6 100644 --- a/icuSources/i18n/decimfmt.cpp +++ b/icuSources/i18n/decimfmt.cpp @@ -1511,6 +1511,45 @@ void DecimalFormat::setSignificantDigitsUsed(UBool useSignificantDigits) { touchNoError(); } +// Group-set several settings used for numbers in date formats. Apple rdar://50064762 +// Equivalent to: +// setGroupingUsed(FALSE); +// setDecimalSeparatorAlwaysShown(FALSE); +// setParseIntegerOnly(TRUE); +// setMinimumFractionDigits(0); +void DecimalFormat::setDateSettings(void) { + if (fields == nullptr) { + return; + } + UBool didChange = FALSE; + + if (fields->properties->groupingUsed) { + NumberFormat::setGroupingUsed(FALSE); // to set field for compatibility + fields->properties->groupingUsed = false; + didChange = TRUE; + } + + if (fields->properties->decimalSeparatorAlwaysShown) { + fields->properties->decimalSeparatorAlwaysShown = false; + didChange = TRUE; + } + + if (!fields->properties->parseIntegerOnly) { + NumberFormat::setParseIntegerOnly(TRUE); // to set field for compatibility + fields->properties->parseIntegerOnly = true; + didChange = TRUE; + } + + if (fields->properties->minimumFractionDigits != 0) { + fields->properties->minimumFractionDigits = 0; + didChange = TRUE; + } + + if (didChange) { + touchNoError(); + } +} + void DecimalFormat::setCurrency(const char16_t* theCurrency, UErrorCode& ec) { // don't overwrite ec if it's already a failure. if (U_FAILURE(ec)) { return; } diff --git a/icuSources/i18n/numfmt.cpp b/icuSources/i18n/numfmt.cpp index 3d37c41a..3ed1f248 100644 --- a/icuSources/i18n/numfmt.cpp +++ b/icuSources/i18n/numfmt.cpp @@ -1171,6 +1171,19 @@ NumberFormat::setMinimumFractionDigits(int32_t newValue) fMaxFractionDigits = fMinFractionDigits; } +// ------------------------------------- +// Group-set several settings used for numbers in date formats. Apple rdar://50064762 + +void +NumberFormat::setDateSettings(void) +{ + fGroupingUsed = FALSE; + fParseIntegerOnly = TRUE; + fMinFractionDigits = 0; + if (fMaxFractionDigits < fMinFractionDigits) + fMaxFractionDigits = fMinFractionDigits; +} + // ------------------------------------- void NumberFormat::setCurrency(const UChar* theCurrency, UErrorCode& ec) { diff --git a/icuSources/i18n/numparse_compositions.cpp b/icuSources/i18n/numparse_compositions.cpp index 53b85d2f..9d8674f3 100644 --- a/icuSources/i18n/numparse_compositions.cpp +++ b/icuSources/i18n/numparse_compositions.cpp @@ -27,15 +27,16 @@ bool SeriesMatcher::match(StringSegment& segment, ParsedNumber& result, UErrorCo const NumberParseMatcher* matcher = *it; bool startCurrencyIsEmpty = (result.currencyCode[0]==0); // Apple fix for int matcherOffset = segment.getOffset(); - if (segment.length() != 0) { + if (segment.length() != 0 + || (startCurrencyIsEmpty && result.seenNumber())) { // Apple maybeMore = matcher->match(segment, result, status); } else { // Nothing for this matcher to match; ask for more. maybeMore = true; } - bool success = ((segment.getOffset() != matcherOffset) - || (startCurrencyIsEmpty && result.currencyCode[0]!=0)); // Apple fix for + bool addedCurrency = (startCurrencyIsEmpty && result.currencyCode[0]!=0); // Apple + bool success = ((segment.getOffset() != matcherOffset) || addedCurrency); // Apple fix for bool isFlexible = matcher->isFlexible(); if (success && isFlexible) { // Match succeeded, and this is a flexible matcher. Re-run it. @@ -44,7 +45,7 @@ bool SeriesMatcher::match(StringSegment& segment, ParsedNumber& result, UErrorCo it++; // Small hack: if there is another matcher coming, do not accept trailing weak chars. // Needed for proper handling of currency spacing. - if (it < end() && segment.getOffset() != result.charEnd && result.charEnd > matcherOffset) { + if (it < end() && segment.getOffset() != result.charEnd && (result.charEnd > matcherOffset || addedCurrency)) { // Apple segment.setOffset(result.charEnd); } } else if (isFlexible) { diff --git a/icuSources/i18n/numparse_currency.cpp b/icuSources/i18n/numparse_currency.cpp index 0bed50de..1065b6bb 100644 --- a/icuSources/i18n/numparse_currency.cpp +++ b/icuSources/i18n/numparse_currency.cpp @@ -25,6 +25,7 @@ CombinedCurrencyMatcher::CombinedCurrencyMatcher(const CurrencySymbols& currency : fCurrency1(currencySymbols.getCurrencySymbol(status)), fCurrency2(currencySymbols.getIntlCurrencySymbol(status)), fUseFullCurrencyData(0 == (parseFlags & PARSE_FLAG_NO_FOREIGN_CURRENCY)), + fCurrencyTrails(0 != (parseFlags & PARSE_FLAG_HAS_TRAIL_CURRENCY)), // Apple afterPrefixInsert(dfs.getPatternForCurrencySpacing(UNUM_CURRENCY_INSERT, false, status)), beforeSuffixInsert(dfs.getPatternForCurrencySpacing(UNUM_CURRENCY_INSERT, true, status)), fLocaleName(dfs.getLocale().getName(), -1, status) { @@ -62,7 +63,8 @@ CombinedCurrencyMatcher::match(StringSegment& segment, ParsedNumber& result, UEr // Try to match a currency spacing separator. int32_t initialOffset = segment.getOffset(); bool maybeMore = false; - if (result.seenNumber() && !beforeSuffixInsert.isEmpty()) { + if (result.seenNumber() && !beforeSuffixInsert.isEmpty() + && segment.length() != 0) { // Apple int32_t overlap = segment.getCommonPrefixLength(beforeSuffixInsert); if (overlap == beforeSuffixInsert.length()) { segment.adjustOffset(overlap); @@ -79,7 +81,8 @@ CombinedCurrencyMatcher::match(StringSegment& segment, ParsedNumber& result, UEr } // Try to match a currency spacing separator. - if (!result.seenNumber() && !afterPrefixInsert.isEmpty()) { + if (!result.seenNumber() && !afterPrefixInsert.isEmpty() + && segment.length() != 0) { // Apple int32_t overlap = segment.getCommonPrefixLength(afterPrefixInsert); if (overlap == afterPrefixInsert.length()) { segment.adjustOffset(overlap); @@ -98,7 +101,7 @@ bool CombinedCurrencyMatcher::matchCurrency(StringSegment& segment, ParsedNumber int32_t overlap1; if (!fCurrency1.isEmpty()) { overlap1 = segment.getCaseSensitivePrefixLength(fCurrency1); - } else if (!fUseFullCurrencyData) { // Apple fix for + } else if (!fUseFullCurrencyData && (!fCurrencyTrails || result.seenNumber())) { // Apple overlap1 = 0; } else { overlap1 = -1; diff --git a/icuSources/i18n/numparse_currency.h b/icuSources/i18n/numparse_currency.h index a9494331..5d50ed4c 100644 --- a/icuSources/i18n/numparse_currency.h +++ b/icuSources/i18n/numparse_currency.h @@ -49,6 +49,7 @@ class U_I18N_API CombinedCurrencyMatcher : public NumberParseMatcher, public UMe UnicodeString fCurrency2; bool fUseFullCurrencyData; + bool fCurrencyTrails; // Apple UnicodeString fLocalLongNames[StandardPlural::COUNT]; UnicodeString afterPrefixInsert; diff --git a/icuSources/i18n/numparse_impl.cpp b/icuSources/i18n/numparse_impl.cpp index 412ea89c..6b71ea6c 100644 --- a/icuSources/i18n/numparse_impl.cpp +++ b/icuSources/i18n/numparse_impl.cpp @@ -122,6 +122,10 @@ NumberParserImpl::createParserFromProperties(const number::impl::DecimalFormatPr } if (parseCurrency || affixProvider->hasCurrencySign()) { parseFlags |= PARSE_FLAG_MONETARY_SEPARATORS; + // Apple check for curr symbol in suffix; use affix API instead? + if (properties.positiveSuffixPattern.indexOf(u'¤') >= 0) { + parseFlags |= PARSE_FLAG_HAS_TRAIL_CURRENCY; + } } if (!parseCurrency) { parseFlags |= PARSE_FLAG_NO_FOREIGN_CURRENCY; @@ -269,10 +273,18 @@ void NumberParserImpl::parse(const UnicodeString& input, int32_t start, bool gre void NumberParserImpl::parseGreedy(StringSegment& segment, ParsedNumber& result, UErrorCode& status) const { // Note: this method is not recursive in order to avoid stack overflow. + bool extraLoop = FALSE; for (int i = 0; i + return; + } + // If we are parsing for currency expected at the end but have not found it yet, + // allow one more loop to see if we are matching an empty currency symbol + if (extraLoop) { + extraLoop = TRUE; // Apple + } } const NumberParseMatcher* matcher = fMatchers[i]; if (!matcher->smokeTest(segment)) { @@ -285,7 +297,8 @@ void NumberParserImpl::parseGreedy(StringSegment& segment, ParsedNumber& result, if (U_FAILURE(status)) { return; } - if (segment.getOffset() != initialOffset) { + if (segment.getOffset() != initialOffset || + (extraLoop && result.currencyCode[0] != 0)) { // Apple // Greedy heuristic: accept the match and loop back i = 0; continue; diff --git a/icuSources/i18n/numparse_types.h b/icuSources/i18n/numparse_types.h index f837d8d2..a9bba869 100644 --- a/icuSources/i18n/numparse_types.h +++ b/icuSources/i18n/numparse_types.h @@ -50,6 +50,7 @@ enum ParseFlags { // PARSE_FLAG_FORCE_BIG_DECIMAL = 0x1000, // not used in ICU4C PARSE_FLAG_NO_FOREIGN_CURRENCY = 0x2000, PARSE_FLAG_ALLOW_INFINITE_RECURSION = 0x4000, + PARSE_FLAG_HAS_TRAIL_CURRENCY = 0x0800, // Apple }; diff --git a/icuSources/i18n/smpdtfmt.cpp b/icuSources/i18n/smpdtfmt.cpp index c922600f..56c32c25 100644 --- a/icuSources/i18n/smpdtfmt.cpp +++ b/icuSources/i18n/smpdtfmt.cpp @@ -303,13 +303,12 @@ void SimpleDateFormat::NSOverride::free() { // to modify it so that it doesn't use thousands separators, doesn't always // show the decimal point, and recognizes integers only when parsing static void fixNumberFormatForDates(NumberFormat &nf) { - nf.setGroupingUsed(FALSE); - DecimalFormat* decfmt = dynamic_cast(&nf); - if (decfmt != NULL) { - decfmt->setDecimalSeparatorAlwaysShown(FALSE); - } - nf.setParseIntegerOnly(TRUE); - nf.setMinimumFractionDigits(0); // To prevent "Jan 1.00, 1997.00" + // Use new group setter equivalent to + // setGroupingUsed(FALSE); + // setDecimalSeparatorAlwaysShown(FALSE); + // setParseIntegerOnly(TRUE); + // setMinimumFractionDigits(0); // To prevent "Jan 1.00, 1997.00" + nf.setDateSettings(); // Apple rdar://50064762 } static const SharedNumberFormat *createSharedNumberFormat( diff --git a/icuSources/i18n/unicode/decimfmt.h b/icuSources/i18n/unicode/decimfmt.h index 748bb97d..6e6a7ff0 100644 --- a/icuSources/i18n/unicode/decimfmt.h +++ b/icuSources/i18n/unicode/decimfmt.h @@ -2006,6 +2006,18 @@ class U_I18N_API DecimalFormat : public NumberFormat { */ void setSignificantDigitsUsed(UBool useSignificantDigits); + /** + * Group-set several settings used for numbers in date formats. + * Avoids calls to touch for each separate setting. + * Equivalent to: + * setGroupingUsed(FALSE); + * setDecimalSeparatorAlwaysShown(FALSE); + * setParseIntegerOnly(TRUE); + * setMinimumFractionDigits(0); + * @internal + */ + void setDateSettings(void) U_OVERRIDE; + /** * Sets the currency used to display currency * amounts. This takes effect immediately, if this format is a diff --git a/icuSources/i18n/unicode/numfmt.h b/icuSources/i18n/unicode/numfmt.h index 178c7a9f..cf188eef 100644 --- a/icuSources/i18n/unicode/numfmt.h +++ b/icuSources/i18n/unicode/numfmt.h @@ -1045,6 +1045,16 @@ public: */ virtual void setRoundingMode(ERoundingMode roundingMode); + /** + * Group-set several settings used for numbers in date formats. + * Equivalent to: + * setGroupingUsed(FALSE); + * setParseIntegerOnly(TRUE); + * setMinimumFractionDigits(0); + * @internal + */ + virtual void setDateSettings(void); + public: /** diff --git a/icuSources/test/cintltst/cldrtest.c b/icuSources/test/cintltst/cldrtest.c index 34633762..bc8d07e8 100644 --- a/icuSources/test/cintltst/cldrtest.c +++ b/icuSources/test/cintltst/cldrtest.c @@ -986,8 +986,10 @@ static void VerifyTranslation(void) { uprv_strcmp(currLoc,"dv") == 0 || uprv_strncmp(currLoc,"dv_",3) == 0 || uprv_strcmp(currLoc,"sa") == 0 || uprv_strncmp(currLoc,"sa_",3) == 0 || uprv_strncmp(currLoc,"kaj",3) == 0 || uprv_strncmp(currLoc,"kpe",3) == 0 || - uprv_strncmp(currLoc,"nqo",3) == 0 || uprv_strncmp(currLoc,"syr",3) == 0 || - uprv_strcmp(currLoc,"ks_Deva") == 0 || uprv_strcmp(currLoc,"sd_Deva") == 0) { // Apple xtra locales + uprv_strncmp(currLoc,"nqo",3) == 0 || uprv_strncmp(currLoc,"sat",3) == 0 || + uprv_strncmp(currLoc,"syr",3) == 0 || + uprv_strcmp(currLoc,"ks_Deva") == 0 || uprv_strncmp(currLoc,"mni_Mtei",8) == 0 || + uprv_strcmp(currLoc,"sd_Deva") == 0 ) { // Apple xtra locales log_verbose("skipping day/month tests for %s, missing some translated names\n", currLoc); } else { UResourceBundle* cal = ures_getByKey(currentLocale, "calendar", NULL, &errorCode); diff --git a/icuSources/test/cintltst/cloctst.c b/icuSources/test/cintltst/cloctst.c index c38033aa..d9d78b64 100644 --- a/icuSources/test/cintltst/cloctst.c +++ b/icuSources/test/cintltst/cloctst.c @@ -3623,6 +3623,24 @@ const char* const basic_maximize_data[][2] = { }, { "ks_Arab", "ks_Arab_IN" + }, { // start Apple tests for + "mni", + "mni_Beng_IN" + }, { + "mni_Beng", + "mni_Beng_IN" + }, { + "mni_Mtei", + "mni_Mtei_IN" + }, { + "sat", + "sat_Olck_IN" + }, { + "sat_Olck", + "sat_Olck_IN" + }, { + "sat_Deva", + "sat_Deva_IN" } }; @@ -6948,6 +6966,26 @@ static const UldnItem hi_Latn_StdMidLong[] = { // Apple + { "mni_Beng", TEST_ULDN_LOCALE, u"মৈতৈলোন্ (বাংলা)" }, + { "mni_Mtei", TEST_ULDN_LOCALE, u"মৈতৈলোন্ (মেইটেই মায়েক)" }, +}; + +static const UldnItem mni_Mtei_StdMidLong[] = { // Apple + { "mni_Beng", TEST_ULDN_LOCALE, u"ꯃꯤꯇꯩꯂꯣꯟ (ꯕꯪꯂꯥ)" }, + { "mni_Mtei", TEST_ULDN_LOCALE, u"ꯃꯤꯇꯩꯂꯣꯟ (ꯃꯤꯇꯩ ꯃꯌꯦꯛ)" }, +}; + +static const UldnItem sat_Olck_StdMidLong[] = { // Apple + { "sat_Olck", TEST_ULDN_LOCALE, u"ᱥᱟᱱᱛᱟᱲᱤ (ᱚᱞ ᱪᱤᱠᱤ)" }, + { "sat_Deva", TEST_ULDN_LOCALE, u"ᱥᱟᱱᱛᱟᱲᱤ (ᱫᱮᱣᱟᱱᱟᱜᱟᱨᱤ)" }, +}; + +static const UldnItem sat_Deva_StdMidLong[] = { // Apple + { "sat_Olck", TEST_ULDN_LOCALE, u"सानताड़ी (अल चीकी)" }, + { "sat_Deva", TEST_ULDN_LOCALE, u"सानताड़ी (देवानागारी)" }, +}; + static const UldnLocAndOpts uldnLocAndOpts[] = { { "en", optStdMidLong, en_StdMidLong, UPRV_LENGTHOF(en_StdMidLong) }, { "en", optStdMidShrt, en_StdMidShrt, UPRV_LENGTHOF(en_StdMidShrt) }, @@ -6967,6 +7005,10 @@ static const UldnLocAndOpts uldnLocAndOpts[] = { { "pa_Aran", optStdMidLong, pa_Arab_StdMidLong, UPRV_LENGTHOF(pa_Arab_StdMidLong) }, { "zh", optStdMidLong, zh_StdMidLong, UPRV_LENGTHOF(zh_StdMidLong) }, { "hi_Latn", optStdMidLong, hi_Latn_StdMidLong, UPRV_LENGTHOF(hi_Latn_StdMidLong) }, + { "mni_Beng", optStdMidLong, mni_Beng_StdMidLong, UPRV_LENGTHOF(mni_Beng_StdMidLong) }, + { "mni_Mtei", optStdMidLong, mni_Mtei_StdMidLong, UPRV_LENGTHOF(mni_Mtei_StdMidLong) }, + { "sat_Olck", optStdMidLong, sat_Olck_StdMidLong, UPRV_LENGTHOF(sat_Olck_StdMidLong) }, + { "sat_Deva", optStdMidLong, sat_Deva_StdMidLong, UPRV_LENGTHOF(sat_Deva_StdMidLong) }, { NULL, NULL, NULL, 0 } }; diff --git a/icuSources/test/cintltst/cmeasureformattest.c b/icuSources/test/cintltst/cmeasureformattest.c index 51e2365a..dabab038 100644 --- a/icuSources/test/cintltst/cmeasureformattest.c +++ b/icuSources/test/cintltst/cmeasureformattest.c @@ -143,14 +143,23 @@ static const SingleUnitFormat fr_CA_singFmt[] = { { UAMEASUNIT_DURATION_MINUTE, 1.0, "1,00 minute", "1 minute", "1 min", "1,0 min", "1m", "1m", 0,1, 0,1 }, { UAMEASUNIT_DURATION_MINUTE, 5.25, "5,25 minutes", "5 minutes", "5,25 min", "5,2 min", "5m", "5m", 0,1, 0,1 }, { UAMEASUNIT_LENGTH_CENTIMETER, 37.203, "37,20 centim\\u00E8tres", "37 centim\\u00E8tres", "37,203 cm", "37,2 cm", "37 cm", "37 cm", 0,2, 0,2 }, - { UAMEASUNIT_TEMPERATURE_CELSIUS, 37.203, "37,20 degr\\u00E9s Celsius", "37 degr\\u00E9s Celsius", "37,203 \\u00B0C", "37,2 \\u00B0C", "37 \\u00B0C", "37\\u00B0", 0,2, 0,2 }, - { UAMEASUNIT_TEMPERATURE_FAHRENHEIT, 37.203, "37,20 degr\\u00E9s Fahrenheit", "37 degr\\u00E9s Fahrenheit", "37,203 \\u00B0F", "37,2 \\u00B0F", "37 \\u00B0F", "37\\u00B0", 0,2, 0,2 }, + { UAMEASUNIT_TEMPERATURE_CELSIUS, 37.203, "37,20 degr\\u00E9s Celsius", "37 degr\\u00E9s Celsius", "37,203\\u00A0\\u00B0C", "37,2\\u00A0\\u00B0C", "37\\u00A0\\u00B0C", "37\\u00B0", 0,2, 0,2 }, + { UAMEASUNIT_TEMPERATURE_FAHRENHEIT, 37.203, "37,20 degr\\u00E9s Fahrenheit", "37 degr\\u00E9s Fahrenheit", "37,203\\u00A0\\u00B0F", "37,2\\u00A0\\u00B0F", "37\\u00A0\\u00B0F", "37\\u00B0", 0,2, 0,2 }, { UAMEASUNIT_TEMPERATURE_GENERIC, 37.203, "37,20\\u00B0", "37\\u00B0", "37,203\\u00B0", "37,2\\u00B0", "37\\u00B0", "37\\u00B0", 0,2, 0,2 }, { UAMEASUNIT_VOLUME_LITER, 37.203, "37,20 litres", "37 litres", "37,203 L", "37,2 L", "37L", "37L", 0,2, 0,2 }, { UAMEASUNIT_ENERGY_FOODCALORIE, 37.203, "37,20 calories", "37 calories", "37,203 cal", "37,2 cal", "37 cal", "37 cal", 0,2, 0,2 }, { (UAMeasureUnit)0, 0, NULL, NULL, NULL, NULL, NULL, NULL } }; +static const SingleUnitFormat zh_Hant_singFmt[] = { +// unit value wide_2 wide_0 shrt_X shrt_1 narr_0 numr_0 wide_0 narr_0 + { UAMEASUNIT_DURATION_MINUTE, 5.25, "5.25\\u5206\\u9418", "5\\u5206\\u9418", "5.25\\u5206\\u9418", "5.2\\u5206\\u9418", "5\\u5206", "5\\u5206", 0,1, 0,1 }, + { UAMEASUNIT_LENGTH_CENTIMETER, 37.203, "37.20\\u516C\\u5206", "37\\u516C\\u5206", "37.203\\u516C\\u5206", "37.2\\u516C\\u5206", "37\\u516C\\u5206", "37\\u516C\\u5206", 0,2, 0,2 }, + { UAMEASUNIT_TEMPERATURE_GENERIC, 37.203, "37.20\\u00B0", "37\\u00B0", "37.203\\u00B0", "37.2\\u00B0", "37\\u00B0", "37\\u00B0", 0,2, 0,2 }, + { UAMEASUNIT_ANGLE_DEGREE, 37.203, "37.20\\u5EA6", "37\\u5EA6", "37.203\\u00B0", "37.2\\u00B0", "37\\u00B0", "37\\u00B0", 0,2, 0,2 }, + { (UAMeasureUnit)0, 0, NULL, NULL, NULL, NULL, NULL, NULL } +}; + static const SingleUnitFormat cs_singFmt[] = { // unit value wide_2 wide_0 shrt_X shrt_1 narr_0 numr_0 wide_0 narr_0 { UAMEASUNIT_DURATION_MINUTE, 0.0, "0,00 minuty", "0 minut", "0 min", "0,0 min", "0 m", "0 m", 0,1, 0,1 }, // other for integer, else many @@ -335,7 +344,7 @@ static const LocaleWidthNumFmtItem lwnItems[] = { { "tr", NULL, NULL, NULL, NULL }, // tr: try plural cases for 1, other { "uk", NULL, NULL, NULL, NULL }, // uk: try plural cases for 1, 2, 5, 8.5 { "vi", NULL, NULL, NULL, NULL }, // vi: try plural cases for other only - { "zh_Hant", NULL, NULL, NULL, NULL }, // zh_Hant: try plural cases for other only + { "zh_Hant", zh_Hant_singFmt, NULL, NULL, NULL }, // zh_Hant: try plural cases for other only { "zh_Hant_HK", NULL, NULL, NULL, NULL }, // =============TERMINATOR diff --git a/icuSources/test/cintltst/cnumtst.c b/icuSources/test/cintltst/cnumtst.c index 463edddf..e2979046 100644 --- a/icuSources/test/cintltst/cnumtst.c +++ b/icuSources/test/cintltst/cnumtst.c @@ -31,6 +31,7 @@ #include "unicode/unumsys.h" #include "unicode/ustring.h" #include "unicode/udisplaycontext.h" +#include "unicode/uchar.h" #include "cintltst.h" #include "cnumtst.h" @@ -2666,7 +2667,7 @@ static void TestCurrencyIsoPluralFormat(void) { {"ja_JP", "42", NULL, "\\u00A542", "\\u00A542", "\\u00A542", "JPY\\u00A042", "42\\u00A0\\u5186"}, {"ja_JP@currency=USD", "42", NULL, "$42.00", "$42.00", "$42.00", "USD\\u00A042.00", "42.00\\u00A0\\u7C73\\u30C9\\u30EB"}, {"ms_MY", "1234.56", "MYR", "RM1,234.56", "RM1,234.56", "RM1,234.56", "MYR1,234.56", "1,234.56 Ringgit Malaysia"}, - {"id_ID", "1234.56", "IDR", "Rp1.234,56", "Rp1.234,56", "Rp1.234,56", "IDR\\u00A01.234,56", "1.234,56 Rupiah Indonesia"}, + {"id_ID", "1234.56", "IDR", "Rp1.235", "Rp1.235", "Rp1.235", "IDR\\u00A01.235", "1.235 Rupiah Indonesia"}, // test locale without currency information {"root", "-1.23", "USD", "-US$\\u00A01.23", "-US$\\u00A01.23", "-US$\\u00A01.23", "-USD\\u00A01.23", "-1.23 USD"}, {"root@cf=account", "-1.23", "USD", "-US$\\u00A01.23", "-US$\\u00A01.23", "-US$\\u00A01.23", "-USD\\u00A01.23", "-1.23 USD"}, @@ -3681,7 +3682,7 @@ static void TestSetSigDigAndRoundIncr(void) { status = U_ZERO_ERROR; ulen = unum_formatDouble(unum, value, ubuf, kUBufMax, NULL, &status); if ( U_FAILURE(status) ) { - printf("unum_formatDouble value %.1f status %s\n", value, u_errorName(status)); + log_err("unum_formatDouble value %.1f status %s\n", value, u_errorName(status)); } else if (u_strcmp(ubuf,u"1.03") != 0) { u_strToUTF8(bbuf, kBBufMax, NULL, ubuf, ulen, &status); log_err("unum_formatDouble value %.1f expected 1.03, got %s\n", value, bbuf); @@ -3873,6 +3874,107 @@ static void TestParseWithEmptyCurr(void) { } unum_close(unum); } + + // Additions for + // "¤#,##0.00" "¤ #,##0.00" "#,##0.00 ¤" "#,##,##0.00¤" + static const char* locales[] = {"en_US", "en_NO", "en_CZ", "en_BD", NULL }; + const char ** localesPtr = locales; + const char* locale; + while ((locale = *localesPtr++) != NULL) { + status = U_ZERO_ERROR; + unum = unum_open(UNUM_CURRENCY, NULL, 0, locale, NULL, &status); + if (U_FAILURE(status)) { + log_data_err("locale %s unum_open UNUM_CURRENCY fails with %s\n", locale, u_errorName(status)); + } else { + char bbuf[kBBufMax] = { 0 }; + UChar curr[4] = { 0 }; + UChar ubuf[kUBufMax]; + int32_t ppos, blen, ulen; + const double posValToUse = 37.0; + const double negValToUse = -3.0; + double val; + + status = U_ZERO_ERROR; + unum_setSymbol(unum, UNUM_CURRENCY_SYMBOL, u"", 0, &status); + if (U_FAILURE(status)) { + log_err("locale %s unum_setSymbol UNUM_CURRENCY_SYMBOL u\"\" fails with %s, skipping\n", locale, u_errorName(status)); + continue; + } + + status = U_ZERO_ERROR; + ulen = unum_formatDouble(unum, posValToUse, ubuf, kUBufMax, NULL, &status); + if (U_FAILURE(status)) { + log_err("locale %s unum_formatDouble %.1f fails with %s, skipping\n", locale, posValToUse, u_errorName(status)); + continue; + } + + status = U_ZERO_ERROR; + ppos = 0; + val = unum_parseDouble(unum, ubuf, ulen, &ppos, &status); + if (U_FAILURE(status)) { + log_err("locale %s unum_parseDouble fails with %s, ppos %d, expect %.1f\n", locale, u_errorName(status), ppos, posValToUse); + } else if (ppos != ulen || val != posValToUse) { + log_err("locale %s unum_parseDouble expect ppos %d, val %.1f; get %d, %.2f\n", locale, ulen, posValToUse, ppos, val); + } + + status = U_ZERO_ERROR; + ulen = unum_formatDouble(unum, negValToUse, ubuf, kUBufMax, NULL, &status); + if (U_FAILURE(status)) { + log_err("locale %s unum_formatDouble %.1f fails with %s, skipping\n", locale, negValToUse, u_errorName(status)); + continue; + } + + status = U_ZERO_ERROR; + ppos = 0; + val = unum_parseDouble(unum, ubuf, ulen, &ppos, &status); + if (U_FAILURE(status)) { + log_err("locale %s unum_parseDouble fails with %s, ppos %d, expect %.1f\n", locale, u_errorName(status), ppos, negValToUse); + } else if (ppos != ulen || val != negValToUse) { + log_err("locale %s unum_parseDouble expect ppos %d, val %.1f; get %d, %.2f\n", locale, ulen, negValToUse, ppos, val); + } + + status = U_ZERO_ERROR; + unum_applyPattern(unum, FALSE, u"#,##0.00¤", -1, NULL, &status); + if (U_FAILURE(status)) { + log_err("locale %s unum_applyPattern \"#,##0.00¤\" fails with %s, skipping\n", locale, u_errorName(status)); + continue; + } + + status = U_ZERO_ERROR; + ulen = unum_formatDouble(unum, posValToUse, ubuf, kUBufMax, NULL, &status); + if (U_FAILURE(status)) { + log_err("locale %s with \"#,##0.00¤\" unum_formatDouble %.1f fails with %s, skipping\n", locale, posValToUse, u_errorName(status)); + continue; + } + + status = U_ZERO_ERROR; + ppos = 0; + val = unum_parseDouble(unum, ubuf, ulen, &ppos, &status); + if (U_FAILURE(status)) { + log_err("locale %s with \"#,##0.00¤\" unum_parseDouble fails with %s, ppos %d, expect %.1f\n", locale, u_errorName(status), ppos, posValToUse); + } else if (ppos != ulen || val != posValToUse) { + log_err("locale %s with \"#,##0.00¤\" unum_parseDouble expect ppos %d, val %.1f; get %d, %.2f\n", locale, ulen, posValToUse, ppos, val); + } + + status = U_ZERO_ERROR; + ulen = unum_formatDouble(unum, negValToUse, ubuf, kUBufMax, NULL, &status); + if (U_FAILURE(status)) { + log_err("locale %s with \"#,##0.00¤\" unum_formatDouble %.1f fails with %s, skipping\n", locale, negValToUse, u_errorName(status)); + continue; + } + + status = U_ZERO_ERROR; + ppos = 0; + val = unum_parseDouble(unum, ubuf, ulen, &ppos, &status); + if (U_FAILURE(status)) { + log_err("locale %s with \"#,##0.00¤\" unum_parseDouble fails with %s, ppos %d, expect %.1f\n", locale, u_errorName(status), ppos, negValToUse); + } else if (ppos != ulen || val != negValToUse) { + log_err("locale %s with \"#,##0.00¤\" unum_parseDouble expect ppos %d, val %.1f; get %d, %.2f\n", locale, ulen, negValToUse, ppos, val); + } + + unum_close(unum); + } + } } // Apple only for @@ -3907,7 +4009,7 @@ static void TestSciNotationNumbers(void) { status = U_ZERO_ERROR; ulen = unum_formatDouble(unum, value, ubuf, kUBufMax, NULL, &status); if ( U_FAILURE(status) ) { - printf("unum_formatDouble value %.1f status %s\n", value, u_errorName(status)); + log_err("unum_formatDouble value %.1f status %s\n", value, u_errorName(status)); } else if (u_strncmp(ubuf,u"1E+0",4) != 0) { u_strToUTF8(bbuf, kBBufMax, NULL, ubuf, ulen, &status); log_err("unum_formatDouble value %.1f expected result to begin with 1E+0, got %s\n", value, bbuf); diff --git a/icuSources/test/intltest/numbertest_parse.cpp b/icuSources/test/intltest/numbertest_parse.cpp index 53c527cc..639d4e3a 100644 --- a/icuSources/test/intltest/numbertest_parse.cpp +++ b/icuSources/test/intltest/numbertest_parse.cpp @@ -107,7 +107,7 @@ void NumberParserTest::testBasic() { {3, u"𝟱𝟭𝟰𝟮𝟯}", u"{0};{0}", 11, 51423.}, {3, u"{𝟱𝟭𝟰𝟮𝟯}", u"{0};{0}", 12, 51423.}, {1, u"a40b", u"a0'0b'", 3, 40.}, // greedy code path thinks "40" is the number - {2, u"a40b", u"a0'0b'", 4, 4.}, // slow code path finds the suffix "0b" + //{2, u"a40b", u"a0'0b'", 4, 4.}, // slow code path finds the suffix "0b" // with , slow has same result as greedy {3, u"𝟱.𝟭𝟰𝟮E𝟯", u"0", 12, 5142.}, {3, u"𝟱.𝟭𝟰𝟮E-𝟯", u"0", 13, 0.005142}, {3, u"𝟱.𝟭𝟰𝟮e-𝟯", u"0", 13, 0.005142}, diff --git a/icuSources/test/intltest/numfmtst.cpp b/icuSources/test/intltest/numfmtst.cpp index 4a4a051c..4ddcfd04 100644 --- a/icuSources/test/intltest/numfmtst.cpp +++ b/icuSources/test/intltest/numfmtst.cpp @@ -8052,7 +8052,9 @@ void NumberFormatTest::TestCurrencyUsage() { // compare the Currency and Currency Cash Digits // Note that as of CLDR 26: - // * TWD and PKR switched from 0 decimals to 2; ISK still has 0, so change test to that + // * TWD and PKR switched from 0 decimals to 2; ISK still has 0, so change test to that. + // * (PKR must have switched back again, because it switched from 0 to 2 again in CLDR 34; + // Apple ICU-64243 restores it to 0 again) // * CAD rounds to .05 in cash mode only // 1st time for getter/setter, 2nd time for factory method Locale enUS_ISK("en_US@currency=ISK"); @@ -8147,7 +8149,7 @@ void NumberFormatTest::TestCurrencyUsage() { UnicodeString PKR_changed; fmt->format(agent, PKR_changed); - assertEquals("Test Currency Usage 6", u"PKR\u00A0123.57", PKR_changed); + assertEquals("Test Currency Usage 6", u"PKR\u00A0124", PKR_changed); delete fmt; } } diff --git a/icuSources/tools/icuinfo/icuinfo.cpp b/icuSources/tools/icuinfo/icuinfo.cpp index fee17cf6..089c8c86 100644 --- a/icuSources/tools/icuinfo/icuinfo.cpp +++ b/icuSources/tools/icuinfo/icuinfo.cpp @@ -46,6 +46,7 @@ static UOption options[]={ /*5*/ UOPTION_DEF("milisecond-time", 'm', UOPT_NO_ARG), /*6*/ UOPTION_DEF("cleanup", 'K', UOPT_NO_ARG), /*7*/ UOPTION_DEF("xml", 'x', UOPT_REQUIRES_ARG), + /*8*/ UOPTION_DEF("perf", 'p', UOPT_NO_ARG), // Apple }; static UErrorCode initStatus = U_ZERO_ERROR; @@ -58,6 +59,7 @@ static void do_init() { } } +static void cmd_perf(); // Apple void cmd_millis() { @@ -130,7 +132,7 @@ void cmd_version(UBool /* noLoad */, UErrorCode &errorCode) #endif #else fprintf(stderr, "Plugins are disabled.\n"); -#endif +#endif } void cmd_cleanup() @@ -248,7 +250,8 @@ main(int argc, char* argv[]) { " -L or --list-plugins - List and diagnose issues with ICU Plugins\n" #endif " -K or --cleanup - Call u_cleanup() before exitting (will attempt to unload plugins)\n" - "\n" + " -p or --perf - Perf tests (Apple)\n" + "\n" "If no arguments are given, the tool will print ICU version and configuration information.\n" ); fprintf(stderr, "International Components for Unicode %s\n%s\n", U_ICU_VERSION, U_COPYRIGHT_STRING ); @@ -291,9 +294,61 @@ main(int argc, char* argv[]) { didSomething = TRUE; } + if(options[8].doesOccur) { // Apple + cmd_perf(); + didSomething=TRUE; + } + if(!didSomething) { cmd_version(FALSE, errorCode); /* at least print the version # */ } return U_FAILURE(errorCode); } + +// Apple addition +#include +#include +#include +#include +enum { kUCharsOutMax = 128, kBytesOutMax = 256 }; + +static void cmd_perf() { + static const char* locale = "en_US"; + static const UChar* tzName = (const UChar*)u"America/Los_Angeles"; + static const UDate udatTry1 = 1290714600000.0; // 2010 Nov. 25 (Thurs) 11:50:00 AM PT + static const UDate udatTry2 = 1451736016000.0; // 2016 Jan. 02 ... + int remaining = 2; + mach_timebase_info_data_t info; + mach_timebase_info(&info); + while (remaining-- > 0) { + uint64_t start, durationOpen, durationUse1, durationUse2; + UDateFormat *udatfmt; + int32_t datlen1, datlen2; + UChar outUChars[kUCharsOutMax]; + UErrorCode status = U_ZERO_ERROR; + + start = mach_absolute_time(); + udatfmt = udat_open(UDAT_MEDIUM, UDAT_FULL, locale, tzName, -1, NULL, 0, &status); + durationOpen = ((mach_absolute_time() - start) * info.numer)/info.denom; + if ( U_SUCCESS(status) ) { + start = mach_absolute_time(); + datlen1 = udat_format(udatfmt, udatTry1, outUChars, kUCharsOutMax, NULL, &status); + durationUse1 = ((mach_absolute_time() - start) * info.numer)/info.denom; + + start = mach_absolute_time(); + datlen2 = udat_format(udatfmt, udatTry2, outUChars, kUCharsOutMax, NULL, &status); + durationUse2 = ((mach_absolute_time() - start) * info.numer)/info.denom; + + if ( U_SUCCESS(status) ) { + printf("first time %d udat open, fmt1(len %d), fmt2(len %d) nsec:\t%llu\t%llu\t%llu\n", remaining, datlen1, datlen2, durationOpen, durationUse1, durationUse2); + } else { + printf("first time %d udat_format failed\n", remaining); + } + udat_close(udatfmt); + } else { + printf("first time %d udat_open failed\n", remaining); + } + } +} + diff --git a/makefile b/makefile index fbc63ec4..de80321d 100644 --- a/makefile +++ b/makefile @@ -885,6 +885,34 @@ LIBOVERRIDES=LIBICUDT="-L$(OBJROOT_CURRENT) -l$(LIB_NAME)" \ LIBICUUC="-L$(OBJROOT_CURRENT) -l$(LIB_NAME)" \ LIBICUI18N="-L$(OBJROOT_CURRENT) -l$(LIB_NAME)" +CFLAGS_SANITIZER := +CXXFLAGS_SANITIZER := +LDFLAGS_SANITIZER := +ifeq ($(RC_ENABLE_ADDRESS_SANITIZATION),1) + $(info Enabling Address Sanitizer) + ASAN_FLAGS:=-fsanitize=address + CFLAGS_SANITIZER += $(ASAN_FLAGS) + CXXFLAGS_SANITIZER += $(ASAN_FLAGS) + LDFLAGS_SANITIZER += $(ASAN_FLAGS) +endif + +ifeq ($(RC_ENABLE_UNDEFINED_BEHAVIOR_SANITIZATION),1) + $(info Enabling Undefined Behaviour Sanitizer) + UBSAN_FLAGS:=-fsanitize=undefined + CFLAGS_SANITIZER += $(UBSAN_FLAGS) + CXXFLAGS_SANITIZER += $(UBSAN_FLAGS) + LDFLAGS_SANITIZER += $(UBSAN_FLAGS) +endif + +ifeq ($(RC_ENABLE_THREAD_SANITIZATION),1) + $(info Enabling Thread Sanitizer) + TSAN_FLAGS:=-fsanitize=thread + CFLAGS_SANITIZER += $(TSAN_FLAGS) + CXXFLAGS_SANITIZER += $(TSAN_FLAGS) + LDFLAGS_SANITIZER += $(TSAN_FLAGS) +endif +LDFLAGS += $(LDFLAGS_SANITIZER) + # For normal Windows builds set the ENV= options here; for debug Windows builds set the ENV_DEBUG= # options here and also the update the LINK.EXE lines in the TARGETS section below. ifeq "$(WINDOWS)" "YES" @@ -986,8 +1014,8 @@ else CPPFLAGS="$(DEFINE_BUILD_LEVEL) -DSTD_INSPIRED -DMAC_OS_X_VERSION_MIN_REQUIRED=$(MAC_OS_X_VERSION_MIN_REQUIRED) $(ISYSROOT) $(ENV_CONFIGURE_ARCHS)" \ CC="$(CC)" \ CXX="$(CXX)" \ - CFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DU_TIMEZONE=timezone -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_FILES_DIR=\"\\\"$(TZDATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_PACKAGE=\"\\\"$(TZDATA_PACKAGE)\\\"\" $(ENV_CONFIGURE_ARCHS) $(ICU_TARGET_VERSION) -g -Os -Wglobal-constructors -fno-exceptions -fvisibility=hidden $(ISYSROOT) $(THUMB_FLAG)" \ - CXXFLAGS="--std=c++11 -DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DU_TIMEZONE=timezone -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_FILES_DIR=\"\\\"$(TZDATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_PACKAGE=\"\\\"$(TZDATA_PACKAGE)\\\"\" $(ENV_CONFIGURE_ARCHS) $(ICU_TARGET_VERSION) -g -Os -Wglobal-constructors -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden $(ISYSROOT) $(THUMB_FLAG)" \ + CFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DU_TIMEZONE=timezone -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_FILES_DIR=\"\\\"$(TZDATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_PACKAGE=\"\\\"$(TZDATA_PACKAGE)\\\"\" $(ENV_CONFIGURE_ARCHS) $(ICU_TARGET_VERSION) -g -Os -Wglobal-constructors -fno-exceptions -fvisibility=hidden $(ISYSROOT) $(THUMB_FLAG) $(CFLAGS_SANITIZER)" \ + CXXFLAGS="--std=c++11 -DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DU_TIMEZONE=timezone -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_FILES_DIR=\"\\\"$(TZDATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_PACKAGE=\"\\\"$(TZDATA_PACKAGE)\\\"\" $(ENV_CONFIGURE_ARCHS) $(ICU_TARGET_VERSION) -g -Os -Wglobal-constructors -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden $(ISYSROOT) $(THUMB_FLAG) $(CXXFLAGS_SANITIZER)" \ RC_ARCHS="$(RC_ARCHS)" $(FORCEENDIAN)\ TZDATA="$(TZDATA)" \ DYLD_LIBRARY_PATH="$(DSTROOT)/usr/local/lib" @@ -995,8 +1023,8 @@ else ENV= APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \ CC="$(CC)" \ CXX="$(CXX)" \ - CFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DU_TIMEZONE=timezone -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_FILES_DIR=\"\\\"$(TZDATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_PACKAGE=\"\\\"$(TZDATA_PACKAGE)\\\"\" $(RC_ARCHS:%=-arch %) $(ICU_TARGET_VERSION) -g -Os -Wglobal-constructors -fno-exceptions -fvisibility=hidden $(ISYSROOT) $(THUMB_FLAG)" \ - CXXFLAGS="--std=c++11 -DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DU_TIMEZONE=timezone -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_FILES_DIR=\"\\\"$(TZDATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_PACKAGE=\"\\\"$(TZDATA_PACKAGE)\\\"\" $(RC_ARCHS:%=-arch %) $(ICU_TARGET_VERSION) -g -Os -Wglobal-constructors -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden $(ISYSROOT) $(THUMB_FLAG)" \ + CFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DU_TIMEZONE=timezone -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_FILES_DIR=\"\\\"$(TZDATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_PACKAGE=\"\\\"$(TZDATA_PACKAGE)\\\"\" $(RC_ARCHS:%=-arch %) $(ICU_TARGET_VERSION) -g -Os -Wglobal-constructors -fno-exceptions -fvisibility=hidden $(ISYSROOT) $(THUMB_FLAG) $(CFLAGS_SANITIZER)" \ + CXXFLAGS="--std=c++11 -DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DU_TIMEZONE=timezone -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_FILES_DIR=\"\\\"$(TZDATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_PACKAGE=\"\\\"$(TZDATA_PACKAGE)\\\"\" $(RC_ARCHS:%=-arch %) $(ICU_TARGET_VERSION) -g -Os -Wglobal-constructors -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden $(ISYSROOT) $(THUMB_FLAG) $(CXXFLAGS_SANITIZER)" \ RC_ARCHS="$(RC_ARCHS)" \ TZDATA="$(TZDATA)" \ DYLD_LIBRARY_PATH="$(DSTROOT)/usr/local/lib" @@ -1004,8 +1032,8 @@ else ENV_DEBUG= APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \ CC="$(CC)" \ CXX="$(CXX)" \ - CFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DU_TIMEZONE=timezone -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_FILES_DIR=\"\\\"$(TZDATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_PACKAGE=\"\\\"$(TZDATA_PACKAGE)\\\"\" $(RC_ARCHS:%=-arch %) $(ICU_TARGET_VERSION) -O0 -gfull -Wglobal-constructors -fno-exceptions -fvisibility=hidden $(ISYSROOT) $(THUMB_FLAG)" \ - CXXFLAGS="--std=c++11 -DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DU_TIMEZONE=timezone -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_FILES_DIR=\"\\\"$(TZDATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_PACKAGE=\"\\\"$(TZDATA_PACKAGE)\\\"\" $(RC_ARCHS:%=-arch %) $(ICU_TARGET_VERSION) -O0 -gfull -Wglobal-constructors -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden $(ISYSROOT) $(THUMB_FLAG)" \ + CFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DU_TIMEZONE=timezone -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_FILES_DIR=\"\\\"$(TZDATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_PACKAGE=\"\\\"$(TZDATA_PACKAGE)\\\"\" $(RC_ARCHS:%=-arch %) $(ICU_TARGET_VERSION) -O0 -gfull -Wglobal-constructors -fno-exceptions -fvisibility=hidden $(ISYSROOT) $(THUMB_FLAG) $(CFLAGS_SANITIZER)" \ + CXXFLAGS="--std=c++11 -DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DU_TIMEZONE=timezone -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_FILES_DIR=\"\\\"$(TZDATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_PACKAGE=\"\\\"$(TZDATA_PACKAGE)\\\"\" $(RC_ARCHS:%=-arch %) $(ICU_TARGET_VERSION) -O0 -gfull -Wglobal-constructors -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden $(ISYSROOT) $(THUMB_FLAG) $(CXXFLAGS_SANITIZER)" \ RC_ARCHS="$(RC_ARCHS)" \ TZDATA="$(TZDATA)" \ DYLD_LIBRARY_PATH="$(DSTROOT)/usr/local/lib" @@ -1013,8 +1041,8 @@ else ENV_PROFILE= APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \ CC="$(CC)" \ CXX="$(CXX)" \ - CFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DU_TIMEZONE=timezone -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_FILES_DIR=\"\\\"$(TZDATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_PACKAGE=\"\\\"$(TZDATA_PACKAGE)\\\"\" $(RC_ARCHS:%=-arch %) $(ICU_TARGET_VERSION) -g -Os -pg -Wglobal-constructors -fno-exceptions -fvisibility=hidden $(ISYSROOT) $(THUMB_FLAG)" \ - CXXFLAGS="--std=c++11 -DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DU_TIMEZONE=timezone -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_FILES_DIR=\"\\\"$(TZDATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_PACKAGE=\"\\\"$(TZDATA_PACKAGE)\\\"\" $(RC_ARCHS:%=-arch %) $(ICU_TARGET_VERSION) -g -Os -pg -Wglobal-constructors -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden $(ISYSROOT) $(THUMB_FLAG)" \ + CFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DU_TIMEZONE=timezone -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_FILES_DIR=\"\\\"$(TZDATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_PACKAGE=\"\\\"$(TZDATA_PACKAGE)\\\"\" $(RC_ARCHS:%=-arch %) $(ICU_TARGET_VERSION) -g -Os -pg -Wglobal-constructors -fno-exceptions -fvisibility=hidden $(ISYSROOT) $(THUMB_FLAG) $(CFLAGS_SANITIZER)" \ + CXXFLAGS="--std=c++11 -DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DU_TIMEZONE=timezone -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_FILES_DIR=\"\\\"$(TZDATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_PACKAGE=\"\\\"$(TZDATA_PACKAGE)\\\"\" $(RC_ARCHS:%=-arch %) $(ICU_TARGET_VERSION) -g -Os -pg -Wglobal-constructors -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden $(ISYSROOT) $(THUMB_FLAG) $(CXXFLAGS_SANITIZER)" \ RC_ARCHS="$(RC_ARCHS)" \ TZDATA="$(TZDATA)" \ DYLD_LIBRARY_PATH="$(DSTROOT)/usr/local/lib" @@ -1023,16 +1051,16 @@ else CPPFLAGS="$(DEFINE_BUILD_LEVEL) -DSTD_INSPIRED -DMAC_OS_X_VERSION_MIN_REQUIRED=$(MAC_OS_X_VERSION_MIN_REQUIRED) $(HOSTISYSROOT)" \ CC="$(HOSTCC)" \ CXX="$(HOSTCXX)" \ - CFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DU_TIMEZONE=timezone -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR_BUILDHOST)\\\"\" -DMAC_OS_X_VERSION_MIN_REQUIRED=$(MAC_OS_X_VERSION_MIN_REQUIRED) -mmacosx-version-min=$(OSX_HOST_VERSION_MIN_STRING) $(HOSTISYSROOT) -g -Os -Wglobal-constructors -fno-exceptions -fvisibility=hidden" \ - CXXFLAGS="--std=c++11 -DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DU_TIMEZONE=timezone -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR_BUILDHOST)\\\"\" -DMAC_OS_X_VERSION_MIN_REQUIRED=$(MAC_OS_X_VERSION_MIN_REQUIRED) -mmacosx-version-min=$(OSX_HOST_VERSION_MIN_STRING) $(HOSTISYSROOT) -g -Os -Wglobal-constructors -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden" \ + CFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DU_TIMEZONE=timezone -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR_BUILDHOST)\\\"\" -DMAC_OS_X_VERSION_MIN_REQUIRED=$(MAC_OS_X_VERSION_MIN_REQUIRED) -mmacosx-version-min=$(OSX_HOST_VERSION_MIN_STRING) $(HOSTISYSROOT) -g -Os -Wglobal-constructors -fno-exceptions -fvisibility=hidden $(CFLAGS_SANITIZER)" \ + CXXFLAGS="--std=c++11 -DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DU_TIMEZONE=timezone -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR_BUILDHOST)\\\"\" -DMAC_OS_X_VERSION_MIN_REQUIRED=$(MAC_OS_X_VERSION_MIN_REQUIRED) -mmacosx-version-min=$(OSX_HOST_VERSION_MIN_STRING) $(HOSTISYSROOT) -g -Os -Wglobal-constructors -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden $(CXXFLAGS_SANITIZER)" \ TZDATA="$(TZDATA)" \ DYLD_LIBRARY_PATH="$(DSTROOT)/usr/local/lib" ENV_BUILDHOST= APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \ CC="$(HOSTCC)" \ CXX="$(HOSTCXX)" \ - CFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DU_TIMEZONE=timezone -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR_BUILDHOST)\\\"\" -DMAC_OS_X_VERSION_MIN_REQUIRED=$(MAC_OS_X_VERSION_MIN_REQUIRED) -mmacosx-version-min=$(OSX_HOST_VERSION_MIN_STRING) $(HOSTISYSROOT) -g -Os -Wglobal-constructors -fno-exceptions -fvisibility=hidden" \ - CXXFLAGS="--std=c++11 -DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DU_TIMEZONE=timezone -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR_BUILDHOST)\\\"\" -DMAC_OS_X_VERSION_MIN_REQUIRED=$(MAC_OS_X_VERSION_MIN_REQUIRED) -mmacosx-version-min=$(OSX_HOST_VERSION_MIN_STRING) $(HOSTISYSROOT) -g -Os -Wglobal-constructors -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden" \ + CFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DU_TIMEZONE=timezone -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR_BUILDHOST)\\\"\" -DMAC_OS_X_VERSION_MIN_REQUIRED=$(MAC_OS_X_VERSION_MIN_REQUIRED) -mmacosx-version-min=$(OSX_HOST_VERSION_MIN_STRING) $(HOSTISYSROOT) -g -Os -Wglobal-constructors -fno-exceptions -fvisibility=hidden $(CFLAGS_SANITIZER)" \ + CXXFLAGS="--std=c++11 -DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DU_TIMEZONE=timezone -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR_BUILDHOST)\\\"\" -DMAC_OS_X_VERSION_MIN_REQUIRED=$(MAC_OS_X_VERSION_MIN_REQUIRED) -mmacosx-version-min=$(OSX_HOST_VERSION_MIN_STRING) $(HOSTISYSROOT) -g -Os -Wglobal-constructors -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden $(CXXFLAGS_SANITIZER)" \ TZDATA="$(TZDATA)" \ DYLD_LIBRARY_PATH="$(DSTROOT)/usr/local/lib" -- 2.45.2