]> git.saurik.com Git - apple/icu.git/commitdiff
ICU-64243.0.1.tar.gz macos-10151 v64243.0.1
authorApple <opensource@apple.com>
Tue, 24 Mar 2020 21:37:26 +0000 (21:37 +0000)
committerApple <opensource@apple.com>
Tue, 24 Mar 2020 21:37:26 +0000 (21:37 +0000)
72 files changed:
emojiData/charClasses.txt
emojiData/lineClasses.txt
icuSources/common/ualoc.cpp
icuSources/data/brkitr/rules/char.txt
icuSources/data/curr/mni_Mtei.txt [new file with mode: 0644]
icuSources/data/curr/sat.txt [new file with mode: 0644]
icuSources/data/curr/sat_Deva.txt [new file with mode: 0644]
icuSources/data/curr/supplementalData.txt
icuSources/data/icu-locale-deprecates.xml
icuSources/data/lang/mni.txt
icuSources/data/lang/mni_Mtei.txt [new file with mode: 0644]
icuSources/data/lang/sat.txt [new file with mode: 0644]
icuSources/data/lang/sat_Deva.txt [new file with mode: 0644]
icuSources/data/locales/mni.txt
icuSources/data/locales/mni_Beng.txt [new file with mode: 0644]
icuSources/data/locales/mni_Beng_IN.txt [new file with mode: 0644]
icuSources/data/locales/mni_IN.txt
icuSources/data/locales/mni_Mtei.txt [new file with mode: 0644]
icuSources/data/locales/mni_Mtei_IN.txt [new file with mode: 0644]
icuSources/data/locales/sat.txt [new file with mode: 0644]
icuSources/data/locales/sat_Deva.txt [new file with mode: 0644]
icuSources/data/locales/sat_Deva_IN.txt [new file with mode: 0644]
icuSources/data/locales/sat_IN.txt [new file with mode: 0644]
icuSources/data/locales/sat_Olck.txt [new file with mode: 0644]
icuSources/data/locales/sat_Olck_IN.txt [new file with mode: 0644]
icuSources/data/misc/likelySubtags.txt
icuSources/data/misc/metadata.txt
icuSources/data/misc/supplementalData.txt
icuSources/data/region/mni_Mtei.txt [new file with mode: 0644]
icuSources/data/region/sat.txt [new file with mode: 0644]
icuSources/data/region/sat_Deva.txt [new file with mode: 0644]
icuSources/data/unit/ca.txt
icuSources/data/unit/cs.txt
icuSources/data/unit/en_CA.txt
icuSources/data/unit/es_MX.txt
icuSources/data/unit/es_US.txt
icuSources/data/unit/fi.txt
icuSources/data/unit/fr_CA.txt
icuSources/data/unit/hu.txt
icuSources/data/unit/it.txt
icuSources/data/unit/mni_Mtei.txt [new file with mode: 0644]
icuSources/data/unit/nb.txt
icuSources/data/unit/nn.txt
icuSources/data/unit/pt.txt
icuSources/data/unit/ro.txt
icuSources/data/unit/ru.txt
icuSources/data/unit/sat.txt [new file with mode: 0644]
icuSources/data/unit/sat_Deva.txt [new file with mode: 0644]
icuSources/data/unit/sk.txt
icuSources/data/unit/sv.txt
icuSources/data/unit/zh_Hant.txt
icuSources/data/zone/mni_Mtei.txt [new file with mode: 0644]
icuSources/data/zone/sat.txt [new file with mode: 0644]
icuSources/data/zone/sat_Deva.txt [new file with mode: 0644]
icuSources/i18n/decimfmt.cpp
icuSources/i18n/numfmt.cpp
icuSources/i18n/numparse_compositions.cpp
icuSources/i18n/numparse_currency.cpp
icuSources/i18n/numparse_currency.h
icuSources/i18n/numparse_impl.cpp
icuSources/i18n/numparse_types.h
icuSources/i18n/smpdtfmt.cpp
icuSources/i18n/unicode/decimfmt.h
icuSources/i18n/unicode/numfmt.h
icuSources/test/cintltst/cldrtest.c
icuSources/test/cintltst/cloctst.c
icuSources/test/cintltst/cmeasureformattest.c
icuSources/test/cintltst/cnumtst.c
icuSources/test/intltest/numbertest_parse.cpp
icuSources/test/intltest/numfmtst.cpp
icuSources/tools/icuinfo/icuinfo.cpp
makefile

index b50fe1c89eb2fbd8a037f5ed11dc7777905dcfc3..3d1715210c8c90bb7aae80be5524d9a64a1e4bb7 100644 (file)
@@ -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©®™〰〽]];
index dc2fbdcfe89578a97f6cb16fbc584c91187baf59..0333ef756a6d13776a6b873182275a2cdea06256 100644 (file)
@@ -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:];
index da0237c211c7abcb1045285d57a4324937b1b3b9..e22121f0d9bfffeeedf1c381814fef7fbddbaa51 100644 (file)
@@ -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
index 72c1abf737cbdabe4b1dc64c037d90dce77683d7..0db29635be738aff9bc3223000b2d31a3a5dbf47 100644 (file)
@@ -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 (file)
index 0000000..1ce616f
--- /dev/null
@@ -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 (file)
index 0000000..d47ac41
--- /dev/null
@@ -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 (file)
index 0000000..1855c87
--- /dev/null
@@ -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"}
+}
index 7f1c675124eccb29d149e696e8984c699406ccff..59e7de8156a8220a771cc0c559a5784b65761ed6 100644 (file)
@@ -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,
index d2ec74166c477bae977741833e1223e39138a6a1..b06120e80b73071a9029a752a1a45675ed14ed96 100644 (file)
     <alias from="iw" to="he"/>
     <alias from="iw_IL" to="he_IL"/>
     <alias from="ja_JP_TRADITIONAL" to="ja_JP" rbpath="/calendar/default" value="japanese"/>
+    <alias from="mni_IN" to="mni_Beng_IN"/>
     <alias from="mo" to="ro"/>
     <alias from="no_NO" to="nb_NO"/>
     <alias from="no_NO_NY" to="nn_NO"/>
     <alias from="no" to="nb"/>
     <alias from="pa_IN" to="pa_Guru_IN"/>
     <alias from="pa_PK" to="pa_Arab_PK"/>
+    <alias from="sat_IN" to="sat_Olck_IN"/>
     <alias from="sh" to="sr_Latn"/>
     <alias from="sh_BA" to="sr_Latn_BA"/>
     <alias from="sh_CS" to="sr_Latn_RS"/>
index 07bd0471f2651f52bb4e4194b4efc93b522f964d..d34da126a3722792022a255e251f0d5cda72b0af 100644 (file)
@@ -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 (file)
index 0000000..b7eb467
--- /dev/null
@@ -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 (file)
index 0000000..a2a50cb
--- /dev/null
@@ -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 (file)
index 0000000..dcf4b6e
--- /dev/null
@@ -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}"}
+    }
+}
index 04e09b4c50d4a4ef579d4574a111a5f41e2646f2..6373c691428341f30bc84229f1f6dd52b4aab65f 100644 (file)
@@ -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 (file)
index 0000000..1414c25
--- /dev/null
@@ -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 (file)
index 0000000..1959e5a
--- /dev/null
@@ -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"}
+}
index 23140657e9c6f7ff9c4a01983ac835ae9cadca38..00d8c00a15b3b3e0feea68940e26fd4f6bac7b5f 100644 (file)
@@ -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 (file)
index 0000000..1481971
--- /dev/null
@@ -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 (file)
index 0000000..457ba8c
--- /dev/null
@@ -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 (file)
index 0000000..b5c5006
--- /dev/null
@@ -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 (file)
index 0000000..7cd6214
--- /dev/null
@@ -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 (file)
index 0000000..8da8282
--- /dev/null
@@ -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 (file)
index 0000000..c4976b4
--- /dev/null
@@ -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 (file)
index 0000000..c579a7e
--- /dev/null
@@ -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 (file)
index 0000000..43d5959
--- /dev/null
@@ -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"}
+}
index a23c5049a1708859605617fde873446a824ea391..c180f15df6e974bf79e17adef306e04964150767 100644 (file)
@@ -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"}
index 239591cd391cb410378fc8bcfc8709e05de75f1d..97248588be9847ed1e0b5b1481bb7b038cec3963 100644 (file)
@@ -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",
index 07f75b16de0424b5ba79baff7f0c12c5fe7e3ed5..1b385a379db0d4ef84a2afa36b379a2c9c8038c4 100644 (file)
@@ -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 (file)
index 0000000..1ce616f
--- /dev/null
@@ -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 (file)
index 0000000..d47ac41
--- /dev/null
@@ -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 (file)
index 0000000..1855c87
--- /dev/null
@@ -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"}
+}
index 3bfba96bf3c51f86f6c1f4cee695d9cb4b134dca..78f87feddd5ae37cdb6f2f30664bcd97f124340d 100644 (file)
@@ -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{"°"}
index a1fbdea1d36409437e9abeac4d1bd67c641c016a..1863faf3c04383ac292d2094cee03e469bd928f7 100644 (file)
@@ -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{"°"}
index 7e909df3fd721a0f1c8f428ce447f82c6cb22bcd..703216d87d8e5fc692e966cf5aa95300da2cf2fe 100644 (file)
@@ -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{
index 0fc9da9ae65c1327b0297cfadf28fbbbb92f12b3..ab99fa8d7e16608fa040faeed1bd47c22d0224f1 100644 (file)
@@ -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{
index 32d09989ff8b02078fa2f2c71c112e993a07ee80..78e33dcf29b3299e2ef9eff77de85754667a8687 100644 (file)
@@ -198,7 +198,7 @@ es_US{
         }
         temperature{
             celsius{
-                one{"{0} °C"}
+                one{"{0} °C"}
             }
         }
         volume{
index 8047b42b469ab962f88a59512c0cc9e538ec6716..1f008c45a7e89e30397f295fd0ded4947efaad39 100644 (file)
@@ -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{"°"}
index b8b872ceab8487577504e048d996ba5a1356f755..d64cdb8b09d1060843a8d5003d7e062a6fc9784b 100644 (file)
@@ -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}°"}
index b0b80239f57454c9ee4be855ae9a6c17e8999300..eecf9815548b9e62e60a53690ed52663832af0b4 100644 (file)
@@ -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{"°"}
index 1608348a8bc87068b33333ff7de85f0616276da7..545b501b964831814c07ae5e0f55afa8c60eb14c 100644 (file)
@@ -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 (file)
index 0000000..1ce616f
--- /dev/null
@@ -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"}
+}
index 4bf35a87e6629e4a29974f3c40b22c96d26b1303..592331fd28e51511a7ee13b2814aca99903ed8a5 100644 (file)
@@ -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{"°"}
index 472aad9ce6adaa3598a8f9c33393be9b8b023c0d..f9bd4503fdd765eb867318bce85d9ba39f7da89b 100644 (file)
@@ -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{"°"}
index a63e563a43bc2b0a563fdbe3525e0fd7c3f32d4a..c004831adba454e360dd6a5f4582e5d67318a479 100644 (file)
@@ -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{
index 778be97c08a562c57fb60a4af46adb4693700724..892b6e5c3417e9bd13306d56b0a32068326f266d 100644 (file)
@@ -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{"°"}
index d89452c37812a1b6454a78161a8f991e8bc88209..0c67b19bd50e812c5c9dc96cc3aaedc08cd57a3e 100644 (file)
@@ -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 (file)
index 0000000..d47ac41
--- /dev/null
@@ -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 (file)
index 0000000..1855c87
--- /dev/null
@@ -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"}
+}
index 979f1243d7312b17190a64c72a168a58704e93e9..7e8900bfa085c5772bb0d04ceb42f54124702b36 100644 (file)
@@ -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{"°"}
index 71ee233203537dc021b3420f63036fb4b1177d4a..3f04c76ee083eaf131e7cb6d14145f4d7f310877 100644 (file)
@@ -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{"°"}
index 1e58d8901563071a0946aec5d081cf22418377a6..b5bdbcc2fa0ac13e1bcd839571dfccb2ba2bdf18 100644 (file)
@@ -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 (file)
index 0000000..1ce616f
--- /dev/null
@@ -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 (file)
index 0000000..d47ac41
--- /dev/null
@@ -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 (file)
index 0000000..1855c87
--- /dev/null
@@ -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"}
+}
index 37ba1fa11b4ffc7945396ea2dd7033b962b4125f..bb3e0bb658d6e32d61fb316903b6fb841013776d 100644 (file)
@@ -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; }
index 3d37c41a405a2540619fd1852f950ba2812f3163..3ed1f248d2e699629542b28e603ffe7e7a587952 100644 (file)
@@ -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) {
index 53b85d2f67217989b96a8ec38009da9483caa64e..9d8674f3d0dbc85c3d1941d743aaaea25147f809 100644 (file)
@@ -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 <rdar://problem/46915356>
         int matcherOffset = segment.getOffset();
-        if (segment.length() != 0) {
+        if (segment.length() != 0
+                || (startCurrencyIsEmpty && result.seenNumber())) { // Apple <rdar://problem/51938595>
             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 <rdar://problem/46915356>
+        bool addedCurrency = (startCurrencyIsEmpty && result.currencyCode[0]!=0); // Apple <rdar://problem/51938595>
+        bool success = ((segment.getOffset() != matcherOffset) || addedCurrency); // Apple fix for <rdar://problem/46915356>
         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 <rdar://problem/51938595>
                 segment.setOffset(result.charEnd);
             }
         } else if (isFlexible) {
index 0bed50de99b2bb4cab66ee3d4c4445ed4ae4989d..1065b6bb41f3d1cdc05d39517955efc4250997f5 100644 (file)
@@ -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 <rdar://problem/51938595>
           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 <rdar://problem/51938595>
         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 <rdar://problem/51938595>
         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 <rdar://problem/46915356>
+    } else if (!fUseFullCurrencyData && (!fCurrencyTrails || result.seenNumber())) { // Apple <rdar://problem/46915356><rdar://problem/51938595>
         overlap1 = 0;
     } else {
         overlap1 = -1;
index a94943312fde9dfc8180dd5192cd520151453370..5d50ed4c3c97a66b92ae973aafadfb426e7c1774 100644 (file)
@@ -49,6 +49,7 @@ class U_I18N_API CombinedCurrencyMatcher : public NumberParseMatcher, public UMe
     UnicodeString fCurrency2;
 
     bool fUseFullCurrencyData;
+    bool fCurrencyTrails; // Apple <rdar://problem/51938595>
     UnicodeString fLocalLongNames[StandardPlural::COUNT];
 
     UnicodeString afterPrefixInsert;
index 412ea89c86b6518c5f368173be5214e4cef41ddb..6b71ea6c569a1f5893dd85f1cea573bfdfc8e3ce 100644 (file)
@@ -122,6 +122,10 @@ NumberParserImpl::createParserFromProperties(const number::impl::DecimalFormatPr
     }
     if (parseCurrency || affixProvider->hasCurrencySign()) {
         parseFlags |= PARSE_FLAG_MONETARY_SEPARATORS;
+        // Apple <rdar://problem/51938595> 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 <fNumMatchers;) {
         // Base Case
         if (segment.length() == 0) {
-            return;
+            if ((extraLoop && i==0) || (fParseFlags & PARSE_FLAG_HAS_TRAIL_CURRENCY) == 0 || result.currencyCode[0] != 0) { // Apple <rdar://problem/51938595>
+                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 <rdar://problem/51938595>
+            }
         }
         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 <rdar://problem/51938595>
             // Greedy heuristic: accept the match and loop back
             i = 0;
             continue;
index f837d8d2795a2b4c32421c5c3ea47624c1179b7f..a9bba869507f138662aba4d92be8aca7b285994f 100644 (file)
@@ -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 <rdar://problem/51938595>
 };
 
 
index c922600f33751fc84dba5268abe3150cbada73b7..56c32c25acff65be19bfa96ae38c6f046596db8a 100644 (file)
@@ -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<DecimalFormat*>(&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(
index 748bb97da6ca81fe7055dbc9cb2e3f22e5052af9..6e6a7ff0011bf80b149475c4ff57fcfe442b7619 100644 (file)
@@ -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
index 178c7a9fa55423687d1915595dac9393bdb9279c..cf188eef996a92e861cffd37185365fec6f4eb11 100644 (file)
@@ -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:
 
     /**
index 34633762bf93d9b1cd70bacf0adf27d1cc4e24dc..bc8d07e8789f0b8b76182dcd3185f94f268fbffc 100644 (file)
@@ -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);
index c38033aa4fd723c04ea5384076a60a7fb706235d..d9d78b6459f4fc81d6c8debd53a7e82a477abec6 100644 (file)
@@ -3623,6 +3623,24 @@ const char* const basic_maximize_data[][2] = {
   }, {
     "ks_Arab",
     "ks_Arab_IN"
+  }, { // start Apple tests for <rdar://problem/54153189>
+    "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 <rdar://problem/53216112
        { "hi_Latn_IN",             TEST_ULDN_LOCALE, u"Hindi (Latin, Bhaarat)" },
 };
 
+static const UldnItem mni_Beng_StdMidLong[] = { // Apple <rdar://problem/54153189>
+       { "mni_Beng",               TEST_ULDN_LOCALE, u"মৈতৈলোন্ (বাংলা)" },
+       { "mni_Mtei",               TEST_ULDN_LOCALE, u"মৈতৈলোন্ (মেইটেই মায়েক)" },
+};
+
+static const UldnItem mni_Mtei_StdMidLong[] = { // Apple <rdar://problem/54153189>
+       { "mni_Beng",               TEST_ULDN_LOCALE, u"ꯃꯤꯇꯩꯂꯣꯟ (ꯕꯪꯂꯥ)" },
+       { "mni_Mtei",               TEST_ULDN_LOCALE, u"ꯃꯤꯇꯩꯂꯣꯟ (ꯃꯤꯇꯩ ꯃꯌꯦꯛ)" },
+};
+
+static const UldnItem sat_Olck_StdMidLong[] = { // Apple <rdar://problem/54153189>
+       { "sat_Olck",               TEST_ULDN_LOCALE, u"ᱥᱟᱱᱛᱟᱲᱤ (ᱚᱞ ᱪᱤᱠᱤ)" },
+       { "sat_Deva",               TEST_ULDN_LOCALE, u"ᱥᱟᱱᱛᱟᱲᱤ (ᱫᱮᱣᱟᱱᱟᱜᱟᱨᱤ)" },
+};
+
+static const UldnItem sat_Deva_StdMidLong[] = { // Apple <rdar://problem/54153189>
+       { "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 }
 };
 
index 51e2365acc1b99f049dd28d54e39e45c3126eebb..dabab0380e81cd6eb304a4d4687fa0e5e6ac84ea 100644 (file)
@@ -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
index 463edddf73f59bb4882e26617fe94d8ed5598e4b..e2979046671cd3b8381c3c9b16ba88b434c601f7 100644 (file)
@@ -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 <rdar://problem/51938595>
+    //                              "¤#,##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 <rdar://problem/50113359>
@@ -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);
index 53c527cc06a08cd92e6830d66d7902ab1078c8c6..639d4e3a8a4e5094e2b3612e8bc67d325de549eb 100644 (file)
@@ -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 <rdar://problem/51938595>, 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},
index 4a4a051c0c625838737b15b5d2ce96f88e063bef..4ddcfd045b5071a3c9b1680803ef22a6976d071a 100644 (file)
@@ -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;
     }
 }
index fee17cf685c5de0d2d5cdc9e40ee3e6eb4082a33..089c8c86c7c9463375adab631a85c39355a89bf1 100644 (file)
@@ -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 <unistd.h>
+#include <mach/mach_time.h>
+#include <unicode/ustring.h>
+#include <unicode/udat.h>
+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);
+        }
+    }
+}
+
index fbc63ec409c050085419efce779a987b69666846..de80321defb9763c547d995c5b46960f554dcd90 100644 (file)
--- 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"