Browse Source

deps: ICU 59.1 bump

* No feature changes.
* Bug fixes.
* Details: http://site.icu-project.org/download/59

Fixes: https://github.com/nodejs/node/issues/12077
PR-URL: https://github.com/nodejs/node/pull/12486
Refs: https://github.com/nodejs/node/issues/7844
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
v6
Steven R. Loomis 8 years ago
parent
commit
5d0a770c12
No known key found for this signature in database GPG Key ID: 3932080F4FB419E3
  1. 2
      LICENSE
  2. 4
      configure
  3. 2
      deps/icu-small/LICENSE
  4. 4
      deps/icu-small/README-SMALL-ICU.txt
  5. 4
      deps/icu-small/source/common/appendable.cpp
  6. 4
      deps/icu-small/source/common/bmpset.cpp
  7. 4
      deps/icu-small/source/common/bmpset.h
  8. 2
      deps/icu-small/source/common/brkeng.cpp
  9. 2
      deps/icu-small/source/common/brkeng.h
  10. 2
      deps/icu-small/source/common/brkiter.cpp
  11. 2
      deps/icu-small/source/common/bytestream.cpp
  12. 4
      deps/icu-small/source/common/bytestrie.cpp
  13. 4
      deps/icu-small/source/common/bytestriebuilder.cpp
  14. 4
      deps/icu-small/source/common/bytestrieiterator.cpp
  15. 6
      deps/icu-small/source/common/caniter.cpp
  16. 2
      deps/icu-small/source/common/chariter.cpp
  17. 5
      deps/icu-small/source/common/charstr.cpp
  18. 2
      deps/icu-small/source/common/charstr.h
  19. 2
      deps/icu-small/source/common/cmemory.cpp
  20. 2
      deps/icu-small/source/common/cmemory.h
  21. 4
      deps/icu-small/source/common/cpputils.h
  22. 2
      deps/icu-small/source/common/cstr.cpp
  23. 2
      deps/icu-small/source/common/cstr.h
  24. 2
      deps/icu-small/source/common/cstring.cpp
  25. 2
      deps/icu-small/source/common/cstring.h
  26. 4
      deps/icu-small/source/common/cwchar.cpp
  27. 4
      deps/icu-small/source/common/cwchar.h
  28. 15
      deps/icu-small/source/common/dictbe.cpp
  29. 2
      deps/icu-small/source/common/dictbe.h
  30. 2
      deps/icu-small/source/common/dictionarydata.cpp
  31. 2
      deps/icu-small/source/common/dictionarydata.h
  32. 2
      deps/icu-small/source/common/dtintrv.cpp
  33. 346
      deps/icu-small/source/common/edits.cpp
  34. 4
      deps/icu-small/source/common/errorcode.cpp
  35. 4
      deps/icu-small/source/common/filteredbrk.cpp
  36. 4
      deps/icu-small/source/common/filterednormalizer2.cpp
  37. 2
      deps/icu-small/source/common/hash.h
  38. 2
      deps/icu-small/source/common/icudataver.cpp
  39. 2
      deps/icu-small/source/common/icuplug.cpp
  40. 2
      deps/icu-small/source/common/icuplugimp.h
  41. 126
      deps/icu-small/source/common/listformatter.cpp
  42. 3
      deps/icu-small/source/common/loadednormalizer2impl.cpp
  43. 2
      deps/icu-small/source/common/localsvc.h
  44. 4
      deps/icu-small/source/common/locavailable.cpp
  45. 2
      deps/icu-small/source/common/locbased.cpp
  46. 2
      deps/icu-small/source/common/locbased.h
  47. 4
      deps/icu-small/source/common/locdispnames.cpp
  48. 3
      deps/icu-small/source/common/locdspnm.cpp
  49. 3
      deps/icu-small/source/common/locid.cpp
  50. 5
      deps/icu-small/source/common/loclikely.cpp
  51. 196
      deps/icu-small/source/common/locmap.cpp
  52. 5
      deps/icu-small/source/common/locmap.h
  53. 4
      deps/icu-small/source/common/locresdata.cpp
  54. 2
      deps/icu-small/source/common/locutil.cpp
  55. 2
      deps/icu-small/source/common/locutil.h
  56. 4
      deps/icu-small/source/common/messageimpl.h
  57. 4
      deps/icu-small/source/common/messagepattern.cpp
  58. 2
      deps/icu-small/source/common/msvcres.h
  59. 2
      deps/icu-small/source/common/mutex.h
  60. 2
      deps/icu-small/source/common/norm2_nfc_data.h
  61. 2
      deps/icu-small/source/common/norm2allmodes.h
  62. 4
      deps/icu-small/source/common/normalizer2.cpp
  63. 4
      deps/icu-small/source/common/normalizer2impl.cpp
  64. 6
      deps/icu-small/source/common/normalizer2impl.h
  65. 12
      deps/icu-small/source/common/normlzr.cpp
  66. 2
      deps/icu-small/source/common/parsepos.cpp
  67. 4
      deps/icu-small/source/common/patternprops.cpp
  68. 4
      deps/icu-small/source/common/patternprops.h
  69. 2
      deps/icu-small/source/common/pluralmap.cpp
  70. 2
      deps/icu-small/source/common/pluralmap.h
  71. 2
      deps/icu-small/source/common/propname.cpp
  72. 2
      deps/icu-small/source/common/propname.h
  73. 2
      deps/icu-small/source/common/propname_data.h
  74. 6
      deps/icu-small/source/common/propsvec.cpp
  75. 4
      deps/icu-small/source/common/propsvec.h
  76. 4
      deps/icu-small/source/common/punycode.cpp
  77. 4
      deps/icu-small/source/common/punycode.h
  78. 274
      deps/icu-small/source/common/putil.cpp
  79. 10
      deps/icu-small/source/common/putilimp.h
  80. 2
      deps/icu-small/source/common/rbbi.cpp
  81. 2
      deps/icu-small/source/common/rbbidata.cpp
  82. 4
      deps/icu-small/source/common/rbbidata.h
  83. 2
      deps/icu-small/source/common/rbbinode.cpp
  84. 2
      deps/icu-small/source/common/rbbinode.h
  85. 2
      deps/icu-small/source/common/rbbirb.cpp
  86. 2
      deps/icu-small/source/common/rbbirb.h
  87. 2
      deps/icu-small/source/common/rbbirpt.h
  88. 9
      deps/icu-small/source/common/rbbiscan.cpp
  89. 2
      deps/icu-small/source/common/rbbiscan.h
  90. 2
      deps/icu-small/source/common/rbbisetb.cpp
  91. 2
      deps/icu-small/source/common/rbbisetb.h
  92. 2
      deps/icu-small/source/common/rbbistbl.cpp
  93. 2
      deps/icu-small/source/common/rbbitblb.cpp
  94. 2
      deps/icu-small/source/common/rbbitblb.h
  95. 2
      deps/icu-small/source/common/resbund.cpp
  96. 4
      deps/icu-small/source/common/resbund_cnv.cpp
  97. 2
      deps/icu-small/source/common/resource.cpp
  98. 2
      deps/icu-small/source/common/resource.h
  99. 2
      deps/icu-small/source/common/ruleiter.cpp
  100. 2
      deps/icu-small/source/common/ruleiter.h

2
LICENSE

@ -100,7 +100,7 @@ The externally maintained libraries used by Node.js are:
""" """
COPYRIGHT AND PERMISSION NOTICE (ICU 58 and later) COPYRIGHT AND PERMISSION NOTICE (ICU 58 and later)
Copyright © 1991-2016 Unicode, Inc. All rights reserved. Copyright © 1991-2017 Unicode, Inc. All rights reserved.
Distributed under the Terms of Use in http://www.unicode.org/copyright.html Distributed under the Terms of Use in http://www.unicode.org/copyright.html
Permission is hereby granted, free of charge, to any person obtaining Permission is hereby granted, free of charge, to any person obtaining

4
configure

@ -1043,8 +1043,8 @@ def glob_to_var(dir_base, dir_sub, patch_dir):
def configure_intl(o): def configure_intl(o):
icus = [ icus = [
{ {
'url': 'https://ssl.icu-project.org/files/icu4c/58.2/icu4c-58_2-src.zip', 'url': 'https://ssl.icu-project.org/files/icu4c/59.1/icu4c-59_1-src.zip',
'md5': 'f4fca37508fc5d14390501cf17aef084', 'md5': '29a41f9bb576b06c7eef0487a84a7674',
}, },
] ]
def icu_download(path): def icu_download(path):

2
deps/icu-small/LICENSE

@ -1,6 +1,6 @@
COPYRIGHT AND PERMISSION NOTICE (ICU 58 and later) COPYRIGHT AND PERMISSION NOTICE (ICU 58 and later)
Copyright © 1991-2016 Unicode, Inc. All rights reserved. Copyright © 1991-2017 Unicode, Inc. All rights reserved.
Distributed under the Terms of Use in http://www.unicode.org/copyright.html Distributed under the Terms of Use in http://www.unicode.org/copyright.html
Permission is hereby granted, free of charge, to any person obtaining Permission is hereby granted, free of charge, to any person obtaining

4
deps/icu-small/README-SMALL-ICU.txt

@ -1,8 +1,8 @@
Small ICU sources - auto generated by shrink-icu-src.py Small ICU sources - auto generated by shrink-icu-src.py
This directory contains the ICU subset used by --with-intl=small-icu (the default) This directory contains the ICU subset used by --with-intl=small-icu (the default)
It is a strict subset of ICU 58 source files with the following exception(s): It is a strict subset of ICU 59 source files with the following exception(s):
* deps/icu-small/source/data/in/icudt58l.dat : Reduced-size data file * deps/icu-small/source/data/in/icudt59l.dat : Reduced-size data file
To rebuild this directory, see ../../tools/icu/README.md To rebuild this directory, see ../../tools/icu/README.md

4
deps/icu-small/source/common/appendable.cpp

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
******************************************************************************* *******************************************************************************
@ -6,7 +6,7 @@
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
******************************************************************************* *******************************************************************************
* file name: appendable.cpp * file name: appendable.cpp
* encoding: US-ASCII * encoding: UTF-8
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *

4
deps/icu-small/source/common/bmpset.cpp

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
****************************************************************************** ******************************************************************************
@ -8,7 +8,7 @@
* *
****************************************************************************** ******************************************************************************
* file name: bmpset.cpp * file name: bmpset.cpp
* encoding: US-ASCII * encoding: UTF-8
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *

4
deps/icu-small/source/common/bmpset.h

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
****************************************************************************** ******************************************************************************
@ -8,7 +8,7 @@
* *
****************************************************************************** ******************************************************************************
* file name: bmpset.h * file name: bmpset.h
* encoding: US-ASCII * encoding: UTF-8
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *

2
deps/icu-small/source/common/brkeng.cpp

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
************************************************************************************ ************************************************************************************

2
deps/icu-small/source/common/brkeng.h

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/** /**
************************************************************************************ ************************************************************************************

2
deps/icu-small/source/common/brkiter.cpp

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
******************************************************************************* *******************************************************************************

2
deps/icu-small/source/common/bytestream.cpp

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
// Copyright (C) 2009-2011, International Business Machines // Copyright (C) 2009-2011, International Business Machines
// Corporation and others. All Rights Reserved. // Corporation and others. All Rights Reserved.

4
deps/icu-small/source/common/bytestrie.cpp

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
******************************************************************************* *******************************************************************************
@ -6,7 +6,7 @@
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
******************************************************************************* *******************************************************************************
* file name: bytestrie.cpp * file name: bytestrie.cpp
* encoding: US-ASCII * encoding: UTF-8
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *

4
deps/icu-small/source/common/bytestriebuilder.cpp

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
******************************************************************************* *******************************************************************************
@ -6,7 +6,7 @@
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
******************************************************************************* *******************************************************************************
* file name: bytestriebuilder.cpp * file name: bytestriebuilder.cpp
* encoding: US-ASCII * encoding: UTF-8
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *

4
deps/icu-small/source/common/bytestrieiterator.cpp

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
******************************************************************************* *******************************************************************************
@ -6,7 +6,7 @@
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
******************************************************************************* *******************************************************************************
* file name: bytestrieiterator.cpp * file name: bytestrieiterator.cpp
* encoding: US-ASCII * encoding: UTF-8
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *

6
deps/icu-small/source/common/caniter.cpp

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
***************************************************************************** *****************************************************************************
@ -311,12 +311,12 @@ void U_EXPORT2 CanonicalIterator::permute(UnicodeString &source, UBool skipZeros
// see what the permutations of the characters before and after this one are // see what the permutations of the characters before and after this one are
//Hashtable *subpermute = permute(source.substring(0,i) + source.substring(i + UTF16.getCharCount(cp))); //Hashtable *subpermute = permute(source.substring(0,i) + source.substring(i + UTF16.getCharCount(cp)));
permute(subPermuteString.replace(i, U16_LENGTH(cp), NULL, 0), skipZeros, &subpermute, status); permute(subPermuteString.remove(i, U16_LENGTH(cp)), skipZeros, &subpermute, status);
/* Test for buffer overflows */ /* Test for buffer overflows */
if(U_FAILURE(status)) { if(U_FAILURE(status)) {
return; return;
} }
// The upper replace is destructive. The question is do we have to make a copy, or we don't care about the contents // The upper remove is destructive. The question is do we have to make a copy, or we don't care about the contents
// of source at this point. // of source at this point.
// prefix this character to all of them // prefix this character to all of them

2
deps/icu-small/source/common/chariter.cpp

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
********************************************************************** **********************************************************************

5
deps/icu-small/source/common/charstr.cpp

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
******************************************************************************* *******************************************************************************
@ -6,7 +6,7 @@
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
******************************************************************************* *******************************************************************************
* file name: charstr.cpp * file name: charstr.cpp
* encoding: US-ASCII * encoding: UTF-8
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *
@ -15,6 +15,7 @@
*/ */
#include "unicode/utypes.h" #include "unicode/utypes.h"
#include "unicode/putil.h"
#include "charstr.h" #include "charstr.h"
#include "cmemory.h" #include "cmemory.h"
#include "cstring.h" #include "cstring.h"

2
deps/icu-small/source/common/charstr.h

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
********************************************************************** **********************************************************************

2
deps/icu-small/source/common/cmemory.c → deps/icu-small/source/common/cmemory.cpp

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
****************************************************************************** ******************************************************************************

2
deps/icu-small/source/common/cmemory.h

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
****************************************************************************** ******************************************************************************

4
deps/icu-small/source/common/cpputils.h

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
****************************************************************************** ******************************************************************************
@ -8,7 +8,7 @@
* *
****************************************************************************** ******************************************************************************
* file name: cpputils.h * file name: cpputils.h
* encoding: US-ASCII * encoding: UTF-8
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
*/ */

2
deps/icu-small/source/common/cstr.cpp

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
******************************************************************************* *******************************************************************************

2
deps/icu-small/source/common/cstr.h

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
****************************************************************************** ******************************************************************************

2
deps/icu-small/source/common/cstring.c → deps/icu-small/source/common/cstring.cpp

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
****************************************************************************** ******************************************************************************

2
deps/icu-small/source/common/cstring.h

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
****************************************************************************** ******************************************************************************

4
deps/icu-small/source/common/cwchar.c → deps/icu-small/source/common/cwchar.cpp

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
****************************************************************************** ******************************************************************************
@ -8,7 +8,7 @@
* *
****************************************************************************** ******************************************************************************
* file name: cwchar.c * file name: cwchar.c
* encoding: US-ASCII * encoding: UTF-8
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *

4
deps/icu-small/source/common/cwchar.h

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
****************************************************************************** ******************************************************************************
@ -8,7 +8,7 @@
* *
****************************************************************************** ******************************************************************************
* file name: cwchar.h * file name: cwchar.h
* encoding: US-ASCII * encoding: UTF-8
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *

15
deps/icu-small/source/common/dictbe.cpp

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/** /**
******************************************************************************* *******************************************************************************
@ -1385,12 +1385,25 @@ CjkBreakEngine::divideUpDictionaryRange( UText *inText,
// Now that we're done, convert positions in t_boundary[] (indices in // Now that we're done, convert positions in t_boundary[] (indices in
// the normalized input string) back to indices in the original input UText // the normalized input string) back to indices in the original input UText
// while reversing t_boundary and pushing values to foundBreaks. // while reversing t_boundary and pushing values to foundBreaks.
int32_t prevCPPos = -1;
int32_t prevUTextPos = -1;
for (int32_t i = numBreaks-1; i >= 0; i--) { for (int32_t i = numBreaks-1; i >= 0; i--) {
int32_t cpPos = t_boundary.elementAti(i); int32_t cpPos = t_boundary.elementAti(i);
U_ASSERT(cpPos > prevCPPos);
int32_t utextPos = inputMap.isValid() ? inputMap->elementAti(cpPos) : cpPos + rangeStart; int32_t utextPos = inputMap.isValid() ? inputMap->elementAti(cpPos) : cpPos + rangeStart;
U_ASSERT(utextPos >= prevUTextPos);
if (utextPos > prevUTextPos) {
// Boundaries are added to foundBreaks output in ascending order. // Boundaries are added to foundBreaks output in ascending order.
U_ASSERT(foundBreaks.size() == 0 || foundBreaks.peeki() < utextPos); U_ASSERT(foundBreaks.size() == 0 || foundBreaks.peeki() < utextPos);
foundBreaks.push(utextPos, status); foundBreaks.push(utextPos, status);
} else {
// Normalization expanded the input text, the dictionary found a boundary
// within the expansion, giving two boundaries with the same index in the
// original text. Ignore the second. See ticket #12918.
--numBreaks;
}
prevCPPos = cpPos;
prevUTextPos = utextPos;
} }
// inString goes out of scope // inString goes out of scope

2
deps/icu-small/source/common/dictbe.h

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/** /**
******************************************************************************* *******************************************************************************

2
deps/icu-small/source/common/dictionarydata.cpp

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
******************************************************************************* *******************************************************************************

2
deps/icu-small/source/common/dictionarydata.h

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
******************************************************************************* *******************************************************************************

2
deps/icu-small/source/common/dtintrv.cpp

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/******************************************************************************* /*******************************************************************************
* Copyright (C) 2008, International Business Machines Corporation and * Copyright (C) 2008, International Business Machines Corporation and

346
deps/icu-small/source/common/edits.cpp

@ -0,0 +1,346 @@
// © 2017 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
// edits.cpp
// created: 2017feb08 Markus W. Scherer
#include "unicode/utypes.h"
#include "unicode/edits.h"
#include "cmemory.h"
#include "uassert.h"
U_NAMESPACE_BEGIN
namespace {
// 0000uuuuuuuuuuuu records u+1 unchanged text units.
const int32_t MAX_UNCHANGED_LENGTH = 0x1000;
const int32_t MAX_UNCHANGED = MAX_UNCHANGED_LENGTH - 1;
// 0wwwcccccccccccc with w=1..6 records ccc+1 replacements of w:w text units.
// No length change.
const int32_t MAX_SHORT_WIDTH = 6;
const int32_t MAX_SHORT_CHANGE_LENGTH = 0xfff;
const int32_t MAX_SHORT_CHANGE = 0x6fff;
// 0111mmmmmmnnnnnn records a replacement of m text units with n.
// m or n = 61: actual length follows in the next edits array unit.
// m or n = 62..63: actual length follows in the next two edits array units.
// Bit 30 of the actual length is in the head unit.
// Trailing units have bit 15 set.
const int32_t LENGTH_IN_1TRAIL = 61;
const int32_t LENGTH_IN_2TRAIL = 62;
} // namespace
Edits::~Edits() {
if(array != stackArray) {
uprv_free(array);
}
}
void Edits::reset() {
length = delta = 0;
}
void Edits::addUnchanged(int32_t unchangedLength) {
if(U_FAILURE(errorCode) || unchangedLength == 0) { return; }
if(unchangedLength < 0) {
errorCode = U_ILLEGAL_ARGUMENT_ERROR;
return;
}
// Merge into previous unchanged-text record, if any.
int32_t last = lastUnit();
if(last < MAX_UNCHANGED) {
int32_t remaining = MAX_UNCHANGED - last;
if (remaining >= unchangedLength) {
setLastUnit(last + unchangedLength);
return;
}
setLastUnit(MAX_UNCHANGED);
unchangedLength -= remaining;
}
// Split large lengths into multiple units.
while(unchangedLength >= MAX_UNCHANGED_LENGTH) {
append(MAX_UNCHANGED);
unchangedLength -= MAX_UNCHANGED_LENGTH;
}
// Write a small (remaining) length.
if(unchangedLength > 0) {
append(unchangedLength - 1);
}
}
void Edits::addReplace(int32_t oldLength, int32_t newLength) {
if(U_FAILURE(errorCode)) { return; }
if(oldLength == newLength && 0 < oldLength && oldLength <= MAX_SHORT_WIDTH) {
// Replacement of short oldLength text units by same-length new text.
// Merge into previous short-replacement record, if any.
int32_t last = lastUnit();
if(MAX_UNCHANGED < last && last < MAX_SHORT_CHANGE &&
(last >> 12) == oldLength && (last & 0xfff) < MAX_SHORT_CHANGE_LENGTH) {
setLastUnit(last + 1);
return;
}
append(oldLength << 12);
return;
}
if(oldLength < 0 || newLength < 0) {
errorCode = U_ILLEGAL_ARGUMENT_ERROR;
return;
}
if (oldLength == 0 && newLength == 0) {
return;
}
int32_t newDelta = newLength - oldLength;
if (newDelta != 0) {
if ((newDelta > 0 && delta >= 0 && newDelta > (INT32_MAX - delta)) ||
(newDelta < 0 && delta < 0 && newDelta < (INT32_MIN - delta))) {
// Integer overflow or underflow.
errorCode = U_INDEX_OUTOFBOUNDS_ERROR;
return;
}
delta += newDelta;
}
int32_t head = 0x7000;
if (oldLength < LENGTH_IN_1TRAIL && newLength < LENGTH_IN_1TRAIL) {
head |= oldLength << 6;
head |= newLength;
append(head);
} else if ((capacity - length) >= 5 || growArray()) {
int32_t limit = length + 1;
if(oldLength < LENGTH_IN_1TRAIL) {
head |= oldLength << 6;
} else if(oldLength <= 0x7fff) {
head |= LENGTH_IN_1TRAIL << 6;
array[limit++] = (uint16_t)(0x8000 | oldLength);
} else {
head |= (LENGTH_IN_2TRAIL + (oldLength >> 30)) << 6;
array[limit++] = (uint16_t)(0x8000 | (oldLength >> 15));
array[limit++] = (uint16_t)(0x8000 | oldLength);
}
if(newLength < LENGTH_IN_1TRAIL) {
head |= newLength;
} else if(newLength <= 0x7fff) {
head |= LENGTH_IN_1TRAIL;
array[limit++] = (uint16_t)(0x8000 | newLength);
} else {
head |= LENGTH_IN_2TRAIL + (newLength >> 30);
array[limit++] = (uint16_t)(0x8000 | (newLength >> 15));
array[limit++] = (uint16_t)(0x8000 | newLength);
}
array[length] = (uint16_t)head;
length = limit;
}
}
void Edits::append(int32_t r) {
if(length < capacity || growArray()) {
array[length++] = (uint16_t)r;
}
}
UBool Edits::growArray() {
int32_t newCapacity;
if (array == stackArray) {
newCapacity = 2000;
} else if (capacity == INT32_MAX) {
// Not U_BUFFER_OVERFLOW_ERROR because that could be confused on a string transform API
// with a result-string-buffer overflow.
errorCode = U_INDEX_OUTOFBOUNDS_ERROR;
return FALSE;
} else if (capacity >= (INT32_MAX / 2)) {
newCapacity = INT32_MAX;
} else {
newCapacity = 2 * capacity;
}
// Grow by at least 5 units so that a maximal change record will fit.
if ((newCapacity - capacity) < 5) {
errorCode = U_INDEX_OUTOFBOUNDS_ERROR;
return FALSE;
}
uint16_t *newArray = (uint16_t *)uprv_malloc((size_t)newCapacity * 2);
if (newArray == NULL) {
errorCode = U_MEMORY_ALLOCATION_ERROR;
return FALSE;
}
uprv_memcpy(newArray, array, (size_t)length * 2);
if (array != stackArray) {
uprv_free(array);
}
array = newArray;
capacity = newCapacity;
return TRUE;
}
UBool Edits::copyErrorTo(UErrorCode &outErrorCode) {
if (U_FAILURE(outErrorCode)) { return TRUE; }
if (U_SUCCESS(errorCode)) { return FALSE; }
outErrorCode = errorCode;
return TRUE;
}
UBool Edits::hasChanges() const {
if (delta != 0) {
return TRUE;
}
for (int32_t i = 0; i < length; ++i) {
if (array[i] > MAX_UNCHANGED) {
return TRUE;
}
}
return FALSE;
}
Edits::Iterator::Iterator(const uint16_t *a, int32_t len, UBool oc, UBool crs) :
array(a), index(0), length(len), remaining(0),
onlyChanges_(oc), coarse(crs),
changed(FALSE), oldLength_(0), newLength_(0),
srcIndex(0), replIndex(0), destIndex(0) {}
int32_t Edits::Iterator::readLength(int32_t head) {
if (head < LENGTH_IN_1TRAIL) {
return head;
} else if (head < LENGTH_IN_2TRAIL) {
U_ASSERT(index < length);
U_ASSERT(array[index] >= 0x8000);
return array[index++] & 0x7fff;
} else {
U_ASSERT((index + 2) <= length);
U_ASSERT(array[index] >= 0x8000);
U_ASSERT(array[index + 1] >= 0x8000);
int32_t len = ((head & 1) << 30) |
((int32_t)(array[index] & 0x7fff) << 15) |
(array[index + 1] & 0x7fff);
index += 2;
return len;
}
}
void Edits::Iterator::updateIndexes() {
srcIndex += oldLength_;
if (changed) {
replIndex += newLength_;
}
destIndex += newLength_;
}
UBool Edits::Iterator::noNext() {
// No change beyond the string.
changed = FALSE;
oldLength_ = newLength_ = 0;
return FALSE;
}
UBool Edits::Iterator::next(UBool onlyChanges, UErrorCode &errorCode) {
if (U_FAILURE(errorCode)) { return FALSE; }
// We have an errorCode in case we need to start guarding against integer overflows.
// It is also convenient for caller loops if we bail out when an error was set elsewhere.
updateIndexes();
if (remaining > 0) {
// Fine-grained iterator: Continue a sequence of equal-length changes.
--remaining;
return TRUE;
}
if (index >= length) {
return noNext();
}
int32_t u = array[index++];
if (u <= MAX_UNCHANGED) {
// Combine adjacent unchanged ranges.
changed = FALSE;
oldLength_ = u + 1;
while (index < length && (u = array[index]) <= MAX_UNCHANGED) {
++index;
oldLength_ += u + 1;
}
newLength_ = oldLength_;
if (onlyChanges) {
updateIndexes();
if (index >= length) {
return noNext();
}
// already fetched u > MAX_UNCHANGED at index
++index;
} else {
return TRUE;
}
}
changed = TRUE;
if (u <= MAX_SHORT_CHANGE) {
if (coarse) {
int32_t w = u >> 12;
int32_t len = (u & 0xfff) + 1;
oldLength_ = newLength_ = len * w;
} else {
// Split a sequence of equal-length changes that was compressed into one unit.
oldLength_ = newLength_ = u >> 12;
remaining = u & 0xfff;
return TRUE;
}
} else {
U_ASSERT(u <= 0x7fff);
oldLength_ = readLength((u >> 6) & 0x3f);
newLength_ = readLength(u & 0x3f);
if (!coarse) {
return TRUE;
}
}
// Combine adjacent changes.
while (index < length && (u = array[index]) > MAX_UNCHANGED) {
++index;
if (u <= MAX_SHORT_CHANGE) {
int32_t w = u >> 12;
int32_t len = (u & 0xfff) + 1;
len = len * w;
oldLength_ += len;
newLength_ += len;
} else {
U_ASSERT(u <= 0x7fff);
int32_t oldLen = readLength((u >> 6) & 0x3f);
int32_t newLen = readLength(u & 0x3f);
oldLength_ += oldLen;
newLength_ += newLen;
}
}
return TRUE;
}
UBool Edits::Iterator::findSourceIndex(int32_t i, UErrorCode &errorCode) {
if (U_FAILURE(errorCode) || i < 0) { return FALSE; }
if (i < srcIndex) {
// Reset the iterator to the start.
index = remaining = oldLength_ = newLength_ = srcIndex = replIndex = destIndex = 0;
} else if (i < (srcIndex + oldLength_)) {
// The index is in the current span.
return TRUE;
}
while (next(FALSE, errorCode)) {
if (i < (srcIndex + oldLength_)) {
// The index is in the current span.
return TRUE;
}
if (remaining > 0) {
// Is the index in one of the remaining compressed edits?
// srcIndex is the start of the current span, before the remaining ones.
int32_t len = (remaining + 1) * oldLength_;
if (i < (srcIndex + len)) {
int32_t n = (i - srcIndex) / oldLength_; // 1 <= n <= remaining
len = n * oldLength_;
srcIndex += len;
replIndex += len;
destIndex += len;
remaining -= n;
return TRUE;
}
// Make next() skip all of these edits at once.
oldLength_ = newLength_ = len;
remaining = 0;
}
}
return FALSE;
}
U_NAMESPACE_END

4
deps/icu-small/source/common/errorcode.cpp

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
******************************************************************************* *******************************************************************************
@ -8,7 +8,7 @@
* *
******************************************************************************* *******************************************************************************
* file name: errorcode.cpp * file name: errorcode.cpp
* encoding: US-ASCII * encoding: UTF-8
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *

4
deps/icu-small/source/common/filteredbrk.cpp

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
******************************************************************************* *******************************************************************************
@ -702,4 +702,4 @@ FilteredBreakIteratorBuilder::createInstance(UErrorCode& status) {
U_NAMESPACE_END U_NAMESPACE_END
#endif //#if !UCONFIG_NO_BREAK_ITERATION && U_HAVE_STD_STRING && !UCONFIG_NO_FILTERED_BREAK_ITERATION #endif //#if !UCONFIG_NO_BREAK_ITERATION && !UCONFIG_NO_FILTERED_BREAK_ITERATION

4
deps/icu-small/source/common/filterednormalizer2.cpp

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
******************************************************************************* *******************************************************************************
@ -8,7 +8,7 @@
* *
******************************************************************************* *******************************************************************************
* file name: filterednormalizer2.cpp * file name: filterednormalizer2.cpp
* encoding: US-ASCII * encoding: UTF-8
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *

2
deps/icu-small/source/common/hash.h

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
****************************************************************************** ******************************************************************************

2
deps/icu-small/source/common/icudataver.c → deps/icu-small/source/common/icudataver.cpp

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
****************************************************************************** ******************************************************************************

2
deps/icu-small/source/common/icuplug.cpp

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
****************************************************************************** ******************************************************************************

2
deps/icu-small/source/common/icuplugimp.h

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
****************************************************************************** ******************************************************************************

126
deps/icu-small/source/common/listformatter.cpp

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
******************************************************************************* *******************************************************************************
@ -8,7 +8,7 @@
* *
******************************************************************************* *******************************************************************************
* file name: listformatter.cpp * file name: listformatter.cpp
* encoding: US-ASCII * encoding: UTF-8
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *
@ -25,6 +25,7 @@
#include "charstr.h" #include "charstr.h"
#include "ucln_cmn.h" #include "ucln_cmn.h"
#include "uresimp.h" #include "uresimp.h"
#include "resource.h"
U_NAMESPACE_BEGIN U_NAMESPACE_BEGIN
@ -78,17 +79,6 @@ uprv_deleteListFormatInternal(void *obj) {
U_CDECL_END U_CDECL_END
static ListFormatInternal* loadListFormatInternal(
const Locale& locale,
const char* style,
UErrorCode& errorCode);
static void getStringByKey(
const UResourceBundle* rb,
const char* key,
UnicodeString& result,
UErrorCode& errorCode);
ListFormatter::ListFormatter(const ListFormatter& other) : ListFormatter::ListFormatter(const ListFormatter& other) :
owned(other.owned), data(other.data) { owned(other.owned), data(other.data) {
if (other.owned != NULL) { if (other.owned != NULL) {
@ -171,30 +161,107 @@ const ListFormatInternal* ListFormatter::getListFormatInternal(
return result; return result;
} }
static ListFormatInternal* loadListFormatInternal( static const UChar solidus = 0x2F;
static const UChar aliasPrefix[] = { 0x6C,0x69,0x73,0x74,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x2F }; // "listPattern/"
enum {
kAliasPrefixLen = UPRV_LENGTHOF(aliasPrefix),
kStyleLenMax = 24 // longest currently is 14
};
struct ListFormatter::ListPatternsSink : public ResourceSink {
UnicodeString two, start, middle, end;
#if ((U_PLATFORM == U_PF_AIX) || (U_PLATFORM == U_PF_OS390)) && (U_CPLUSPLUS_VERSION < 11)
char aliasedStyle[kStyleLenMax+1];
ListPatternsSink() {
uprv_memset(aliasedStyle, 0, kStyleLenMax+1);
}
#else
char aliasedStyle[kStyleLenMax+1] = {0};
ListPatternsSink() {}
#endif
virtual ~ListPatternsSink();
void setAliasedStyle(UnicodeString alias) {
int32_t startIndex = alias.indexOf(aliasPrefix, kAliasPrefixLen, 0);
if (startIndex < 0) {
return;
}
startIndex += kAliasPrefixLen;
int32_t endIndex = alias.indexOf(solidus, startIndex);
if (endIndex < 0) {
endIndex = alias.length();
}
alias.extract(startIndex, endIndex-startIndex, aliasedStyle, kStyleLenMax+1, US_INV);
aliasedStyle[kStyleLenMax] = 0;
}
void handleValueForPattern(ResourceValue &value, UnicodeString &pattern, UErrorCode &errorCode) {
if (pattern.isEmpty()) {
if (value.getType() == URES_ALIAS) {
if (aliasedStyle[0] == 0) {
setAliasedStyle(value.getAliasUnicodeString(errorCode));
}
} else {
pattern = value.getUnicodeString(errorCode);
}
}
}
virtual void put(const char *key, ResourceValue &value, UBool /*noFallback*/,
UErrorCode &errorCode) {
aliasedStyle[0] = 0;
if (value.getType() == URES_ALIAS) {
setAliasedStyle(value.getAliasUnicodeString(errorCode));
return;
}
ResourceTable listPatterns = value.getTable(errorCode);
for (int i = 0; U_SUCCESS(errorCode) && listPatterns.getKeyAndValue(i, key, value); ++i) {
if (uprv_strcmp(key, "2") == 0) {
handleValueForPattern(value, two, errorCode);
} else if (uprv_strcmp(key, "end") == 0) {
handleValueForPattern(value, end, errorCode);
} else if (uprv_strcmp(key, "middle") == 0) {
handleValueForPattern(value, middle, errorCode);
} else if (uprv_strcmp(key, "start") == 0) {
handleValueForPattern(value, start, errorCode);
}
}
}
};
// Virtual destructors must be defined out of line.
ListFormatter::ListPatternsSink::~ListPatternsSink() {}
ListFormatInternal* ListFormatter::loadListFormatInternal(
const Locale& locale, const char * style, UErrorCode& errorCode) { const Locale& locale, const char * style, UErrorCode& errorCode) {
UResourceBundle* rb = ures_open(NULL, locale.getName(), &errorCode); UResourceBundle* rb = ures_open(NULL, locale.getName(), &errorCode);
rb = ures_getByKeyWithFallback(rb, "listPattern", rb, &errorCode);
if (U_FAILURE(errorCode)) { if (U_FAILURE(errorCode)) {
ures_close(rb); ures_close(rb);
return NULL; return NULL;
} }
rb = ures_getByKeyWithFallback(rb, "listPattern", rb, &errorCode); ListFormatter::ListPatternsSink sink;
rb = ures_getByKeyWithFallback(rb, style, rb, &errorCode); char currentStyle[kStyleLenMax+1];
uprv_strncpy(currentStyle, style, kStyleLenMax);
currentStyle[kStyleLenMax] = 0;
if (U_FAILURE(errorCode)) { for (;;) {
ures_close(rb); ures_getAllItemsWithFallback(rb, currentStyle, sink, errorCode);
return NULL; if (U_FAILURE(errorCode) || sink.aliasedStyle[0] == 0 || uprv_strcmp(currentStyle, sink.aliasedStyle) == 0) {
break;
}
uprv_strcpy(currentStyle, sink.aliasedStyle);
} }
UnicodeString two, start, middle, end;
getStringByKey(rb, "2", two, errorCode);
getStringByKey(rb, "start", start, errorCode);
getStringByKey(rb, "middle", middle, errorCode);
getStringByKey(rb, "end", end, errorCode);
ures_close(rb); ures_close(rb);
if (U_FAILURE(errorCode)) { if (U_FAILURE(errorCode)) {
return NULL; return NULL;
} }
ListFormatInternal* result = new ListFormatInternal(two, start, middle, end, errorCode); if (sink.two.isEmpty() || sink.start.isEmpty() || sink.middle.isEmpty() || sink.end.isEmpty()) {
errorCode = U_MISSING_RESOURCE_ERROR;
return NULL;
}
ListFormatInternal* result = new ListFormatInternal(sink.two, sink.start, sink.middle, sink.end, errorCode);
if (result == NULL) { if (result == NULL) {
errorCode = U_MEMORY_ALLOCATION_ERROR; errorCode = U_MEMORY_ALLOCATION_ERROR;
return NULL; return NULL;
@ -206,15 +273,6 @@ static ListFormatInternal* loadListFormatInternal(
return result; return result;
} }
static void getStringByKey(const UResourceBundle* rb, const char* key, UnicodeString& result, UErrorCode& errorCode) {
int32_t len;
const UChar* ustr = ures_getStringByKeyWithFallback(rb, key, &len, &errorCode);
if (U_FAILURE(errorCode)) {
return;
}
result.setTo(ustr, len);
}
ListFormatter* ListFormatter::createInstance(UErrorCode& errorCode) { ListFormatter* ListFormatter::createInstance(UErrorCode& errorCode) {
Locale locale; // The default locale. Locale locale; // The default locale.
return createInstance(locale, errorCode); return createInstance(locale, errorCode);

3
deps/icu-small/source/common/loadednormalizer2impl.cpp

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
******************************************************************************* *******************************************************************************
@ -232,6 +232,7 @@ Normalizer2::getInstance(const char *packageName,
} }
} }
if(allModes==NULL) { if(allModes==NULL) {
ucln_common_registerCleanup(UCLN_COMMON_LOADED_NORMALIZER2, uprv_loaded_normalizer2_cleanup);
LocalPointer<Norm2AllModes> localAllModes( LocalPointer<Norm2AllModes> localAllModes(
Norm2AllModes::createInstance(packageName, name, errorCode)); Norm2AllModes::createInstance(packageName, name, errorCode));
if(U_SUCCESS(errorCode)) { if(U_SUCCESS(errorCode)) {

2
deps/icu-small/source/common/localsvc.h

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
*************************************************************************** ***************************************************************************

4
deps/icu-small/source/common/locavailable.cpp

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
******************************************************************************* *******************************************************************************
@ -8,7 +8,7 @@
* *
******************************************************************************* *******************************************************************************
* file name: locavailable.cpp * file name: locavailable.cpp
* encoding: US-ASCII * encoding: UTF-8
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *

2
deps/icu-small/source/common/locbased.cpp

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
********************************************************************** **********************************************************************

2
deps/icu-small/source/common/locbased.h

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
********************************************************************** **********************************************************************

4
deps/icu-small/source/common/locdispnames.cpp

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
******************************************************************************* *******************************************************************************
@ -8,7 +8,7 @@
* *
******************************************************************************* *******************************************************************************
* file name: locdispnames.cpp * file name: locdispnames.cpp
* encoding: US-ASCII * encoding: UTF-8
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *

3
deps/icu-small/source/common/locdspnm.cpp

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
******************************************************************************* *******************************************************************************
@ -13,6 +13,7 @@
#include "unicode/locdspnm.h" #include "unicode/locdspnm.h"
#include "unicode/simpleformatter.h" #include "unicode/simpleformatter.h"
#include "unicode/ucasemap.h"
#include "unicode/ures.h" #include "unicode/ures.h"
#include "unicode/udisplaycontext.h" #include "unicode/udisplaycontext.h"
#include "unicode/brkiter.h" #include "unicode/brkiter.h"

3
deps/icu-small/source/common/locid.cpp

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
********************************************************************** **********************************************************************
@ -33,6 +33,7 @@
#include "unicode/locid.h" #include "unicode/locid.h"
#include "unicode/strenum.h"
#include "unicode/uloc.h" #include "unicode/uloc.h"
#include "putilimp.h" #include "putilimp.h"
#include "mutex.h" #include "mutex.h"

5
deps/icu-small/source/common/loclikely.cpp

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
******************************************************************************* *******************************************************************************
@ -8,7 +8,7 @@
* *
******************************************************************************* *******************************************************************************
* file name: loclikely.cpp * file name: loclikely.cpp
* encoding: US-ASCII * encoding: UTF-8
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *
@ -22,6 +22,7 @@
#include "unicode/utypes.h" #include "unicode/utypes.h"
#include "unicode/locid.h" #include "unicode/locid.h"
#include "unicode/putil.h" #include "unicode/putil.h"
#include "unicode/uchar.h"
#include "unicode/uloc.h" #include "unicode/uloc.h"
#include "unicode/ures.h" #include "unicode/ures.h"
#include "unicode/uscript.h" #include "unicode/uscript.h"

196
deps/icu-small/source/common/locmap.c → deps/icu-small/source/common/locmap.cpp

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
********************************************************************** **********************************************************************
@ -30,6 +30,7 @@
#include "locmap.h" #include "locmap.h"
#include "cstring.h" #include "cstring.h"
#include "cmemory.h" #include "cmemory.h"
#include "unicode/uloc.h"
#if U_PLATFORM == U_PF_WINDOWS && defined(_MSC_VER) && (_MSC_VER >= 1500) #if U_PLATFORM == U_PF_WINDOWS && defined(_MSC_VER) && (_MSC_VER >= 1500)
/* /*
@ -40,10 +41,7 @@
* We might need to #include some Windows header and test for some version macro from there. * We might need to #include some Windows header and test for some version macro from there.
* Or call some Windows function and see what it returns. * Or call some Windows function and see what it returns.
*/ */
#define USE_WINDOWS_LOCALE_API #define USE_WINDOWS_LCID_MAPPING_API
#endif
#ifdef USE_WINDOWS_LOCALE_API
#include <windows.h> #include <windows.h>
#include <winnls.h> #include <winnls.h>
#endif #endif
@ -53,8 +51,8 @@
* The mapping from Win32 locale ID numbers to POSIX locale strings should * The mapping from Win32 locale ID numbers to POSIX locale strings should
* be the faster one. * be the faster one.
* *
* Many LCID values come from winnt.h * Windows LCIDs are defined at https://msdn.microsoft.com/en-us/library/cc233965.aspx
* Some also come from http://www.microsoft.com/globaldev/reference/lcid-all.mspx * [MS-LCID] Windows Language Code Identifier (LCID) Reference
*/ */
/* /*
@ -126,7 +124,9 @@ static const ILcidPosixElement locmap_ ## id [] =
// Keep static locale variables inside the function so that // Keep static locale variables inside the function so that
// it can be created properly during static init. // it can be created properly during static init.
// //
// Note: This table should be updated periodically. Check the National Lanaguage Support API Reference Website. // Note: This table should be updated periodically. Check the [MS-LCID] Windows Language Code Identifier
// (LCID) Reference defined at https://msdn.microsoft.com/en-us/library/cc233965.aspx
//
// Microsoft is moving away from LCID in favor of locale name as of Vista. This table needs to be // Microsoft is moving away from LCID in favor of locale name as of Vista. This table needs to be
// maintained for support of older Windows version. // maintained for support of older Windows version.
// Update: Windows 7 (091130) // Update: Windows 7 (091130)
@ -138,6 +138,9 @@ static const ILcidPosixElement locmap_ ## id [] =
//////////////////////////////////////////// ////////////////////////////////////////////
*/ */
// TODO: For Windows ideally this table would be a list of exceptions rather than a complete list as
// LocaleNameToLCID and LCIDToLocaleName provide 90% of these.
ILCID_POSIX_ELEMENT_ARRAY(0x0436, af, af_ZA) ILCID_POSIX_ELEMENT_ARRAY(0x0436, af, af_ZA)
ILCID_POSIX_SUBTABLE(ar) { ILCID_POSIX_SUBTABLE(ar) {
@ -213,6 +216,7 @@ ILCID_POSIX_SUBTABLE(ca) {
ILCID_POSIX_ELEMENT_ARRAY(0x0483, co, co_FR) ILCID_POSIX_ELEMENT_ARRAY(0x0483, co, co_FR)
ILCID_POSIX_ELEMENT_ARRAY(0x045c, chr,chr_US) ILCID_POSIX_ELEMENT_ARRAY(0x045c, chr,chr_US)
// ICU has chosen different names for these.
ILCID_POSIX_SUBTABLE(ckb) { ILCID_POSIX_SUBTABLE(ckb) {
{0x92, "ckb"}, {0x92, "ckb"},
{0x7c92, "ckb_Arab"}, {0x7c92, "ckb_Arab"},
@ -225,6 +229,7 @@ ILCID_POSIX_ELEMENT_ARRAY(0x0405, cs, cs_CZ)
ILCID_POSIX_ELEMENT_ARRAY(0x0452, cy, cy_GB) ILCID_POSIX_ELEMENT_ARRAY(0x0452, cy, cy_GB)
ILCID_POSIX_ELEMENT_ARRAY(0x0406, da, da_DK) ILCID_POSIX_ELEMENT_ARRAY(0x0406, da, da_DK)
// Windows doesn't know POSIX or BCP47 Unicode phonebook sort names
ILCID_POSIX_SUBTABLE(de) { ILCID_POSIX_SUBTABLE(de) {
{0x07, "de"}, {0x07, "de"},
{0x0c07, "de_AT"}, {0x0c07, "de_AT"},
@ -239,6 +244,7 @@ ILCID_POSIX_SUBTABLE(de) {
ILCID_POSIX_ELEMENT_ARRAY(0x0465, dv, dv_MV) ILCID_POSIX_ELEMENT_ARRAY(0x0465, dv, dv_MV)
ILCID_POSIX_ELEMENT_ARRAY(0x0408, el, el_GR) ILCID_POSIX_ELEMENT_ARRAY(0x0408, el, el_GR)
// Windows uses an empty string for 'invariant'
ILCID_POSIX_SUBTABLE(en) { ILCID_POSIX_SUBTABLE(en) {
{0x09, "en"}, {0x09, "en"},
{0x0c09, "en_AU"}, {0x0c09, "en_AU"},
@ -256,22 +262,23 @@ ILCID_POSIX_SUBTABLE(en) {
{0x4809, "en_SG"}, {0x4809, "en_SG"},
{0x2C09, "en_TT"}, {0x2C09, "en_TT"},
{0x0409, "en_US"}, {0x0409, "en_US"},
{0x007f, "en_US_POSIX"}, /* duplicate for roundtripping */ {0x007f, "en_US_POSIX"}, /* duplicate for round-tripping */
{0x2409, "en_VI"}, /* Virgin Islands AKA Caribbean Islands (en_CB). */ {0x2409, "en_VI"}, /* Virgin Islands AKA Caribbean Islands (en_CB). On Windows8+ This is 0x1000 or dynamically assigned */
{0x1c09, "en_ZA"}, {0x1c09, "en_ZA"},
{0x3009, "en_ZW"}, {0x3009, "en_ZW"},
{0x2409, "en_029"}, {0x2409, "en_029"},
{0x0409, "en_AS"}, /* Alias for en_US. Leave last. */ {0x0409, "en_AS"}, /* Alias for en_US. Leave last. On Windows8+ This is 0x1000 or dynamically assigned */
{0x0409, "en_GU"}, /* Alias for en_US. Leave last. */ {0x0409, "en_GU"}, /* Alias for en_US. Leave last. On Windows8+ This is 0x1000 or dynamically assigned */
{0x0409, "en_MH"}, /* Alias for en_US. Leave last. */ {0x0409, "en_MH"}, /* Alias for en_US. Leave last. On Windows8+ This is 0x1000 or dynamically assigned */
{0x0409, "en_MP"}, /* Alias for en_US. Leave last. */ {0x0409, "en_MP"}, /* Alias for en_US. Leave last. On Windows8+ This is 0x1000 or dynamically assigned */
{0x0409, "en_UM"} /* Alias for en_US. Leave last. */ {0x0409, "en_UM"} /* Alias for en_US. Leave last. On Windows8+ This is 0x1000 or dynamically assigned */
}; };
ILCID_POSIX_SUBTABLE(en_US_POSIX) { ILCID_POSIX_SUBTABLE(en_US_POSIX) {
{0x007f, "en_US_POSIX"} /* duplicate for roundtripping */ {0x007f, "en_US_POSIX"} /* duplicate for roundtripping */
}; };
// Windows doesn't know POSIX or BCP47 Unicode traditional sort names
ILCID_POSIX_SUBTABLE(es) { ILCID_POSIX_SUBTABLE(es) {
{0x0a, "es"}, {0x0a, "es"},
{0x2c0a, "es_AR"}, {0x2c0a, "es_AR"},
@ -297,7 +304,7 @@ ILCID_POSIX_SUBTABLE(es) {
{0x200a, "es_VE"}, {0x200a, "es_VE"},
{0x580a, "es_419"}, {0x580a, "es_419"},
{0x040a, "es_ES@collation=traditional"}, {0x040a, "es_ES@collation=traditional"},
{0x040a, "es@collation=traditional"} {0x040a, "es@collation=traditional"} // Windows will treat this as es-ES@collation=traditional
}; };
ILCID_POSIX_ELEMENT_ARRAY(0x0425, et, et_EE) ILCID_POSIX_ELEMENT_ARRAY(0x0425, et, et_EE)
@ -310,6 +317,7 @@ ILCID_POSIX_SUBTABLE(fa) {
{0x048c, "fa_AF"} /* Persian/Dari (Afghanistan) */ {0x048c, "fa_AF"} /* Persian/Dari (Afghanistan) */
}; };
/* duplicate for roundtripping */ /* duplicate for roundtripping */
ILCID_POSIX_SUBTABLE(fa_AF) { ILCID_POSIX_SUBTABLE(fa_AF) {
{0x8c, "fa_AF"}, /* Persian/Dari (Afghanistan) */ {0x8c, "fa_AF"}, /* Persian/Dari (Afghanistan) */
@ -501,8 +509,9 @@ ILCID_POSIX_SUBTABLE(nl) {
}; };
/* The "no" locale split into nb and nn. By default in ICU, "no" is nb.*/ /* The "no" locale split into nb and nn. By default in ICU, "no" is nb.*/
// TODO: Not all of these are needed on Windows, but I don't know how ICU treats preferred ones here.
ILCID_POSIX_SUBTABLE(no) { ILCID_POSIX_SUBTABLE(no) {
{0x14, "no"}, /* really nb_NO */ {0x14, "no"}, /* really nb_NO - actually Windows differentiates between neutral (no region) and specific (with region) */
{0x7c14, "nb"}, /* really nb */ {0x7c14, "nb"}, /* really nb */
{0x0414, "nb_NO"}, /* really nb_NO. Keep first in the 414 list. */ {0x0414, "nb_NO"}, /* really nb_NO. Keep first in the 414 list. */
{0x0414, "no_NO"}, /* really nb_NO */ {0x0414, "no_NO"}, /* really nb_NO */
@ -591,6 +600,9 @@ ILCID_POSIX_SUBTABLE(ro) {
{0x0818, "ro_MD"} {0x0818, "ro_MD"}
}; };
// TODO: This is almost certainly 'wrong'. 0 in Windows is a synonym for LOCALE_USER_DEFAULT.
// More likely this is a similar concept to the Windows 0x7f Invariant locale ""
// (Except that it's not invariant in ICU)
ILCID_POSIX_SUBTABLE(root) { ILCID_POSIX_SUBTABLE(root) {
{0x00, "root"} {0x00, "root"}
}; };
@ -730,6 +742,8 @@ ILCID_POSIX_ELEMENT_ARRAY(0x0434, xh, xh_ZA)
ILCID_POSIX_ELEMENT_ARRAY(0x043d, yi, yi) ILCID_POSIX_ELEMENT_ARRAY(0x043d, yi, yi)
ILCID_POSIX_ELEMENT_ARRAY(0x046a, yo, yo_NG) ILCID_POSIX_ELEMENT_ARRAY(0x046a, yo, yo_NG)
// Windows & ICU tend to different names for some of these
// TODO: Windows probably does not need all of these entries, but I don't know how the precedence works.
ILCID_POSIX_SUBTABLE(zh) { ILCID_POSIX_SUBTABLE(zh) {
{0x0004, "zh_Hans"}, {0x0004, "zh_Hans"},
{0x7804, "zh"}, {0x7804, "zh"},
@ -753,6 +767,7 @@ ILCID_POSIX_SUBTABLE(zh) {
{0x20804,"zh_Hans@collation=stroke"}, {0x20804,"zh_Hans@collation=stroke"},
{0x20804,"zh_Hans_CN@collation=stroke"}, {0x20804,"zh_Hans_CN@collation=stroke"},
{0x20804,"zh_CN@collation=stroke"} {0x20804,"zh_CN@collation=stroke"}
// TODO: Alternate collations for other LCIDs are missing, eg: 0x50804
}; };
ILCID_POSIX_ELEMENT_ARRAY(0x0435, zu, zu_ZA) ILCID_POSIX_ELEMENT_ARRAY(0x0435, zu, zu_ZA)
@ -991,7 +1006,7 @@ getPosixID(const ILcidPosixMap *this_0, uint32_t hostID)
// //
///////////////////////////////////// /////////////////////////////////////
*/ */
#ifdef USE_WINDOWS_LOCALE_API #ifdef USE_WINDOWS_LCID_MAPPING_API
/* /*
* Various language tags needs to be changed: * Various language tags needs to be changed:
* quz -> qu * quz -> qu
@ -1017,43 +1032,56 @@ uprv_convertToPosix(uint32_t hostid, char *posixID, int32_t posixIDCapacity, UEr
UBool bLookup = TRUE; UBool bLookup = TRUE;
const char *pPosixID = NULL; const char *pPosixID = NULL;
#ifdef USE_WINDOWS_LOCALE_API #ifdef USE_WINDOWS_LCID_MAPPING_API
// Note: Windows primary lang ID 0x92 in LCID is used for Central Kurdish and // Note: Windows primary lang ID 0x92 in LCID is used for Central Kurdish and
// GetLocaleInfo() maps such LCID to "ku". However, CLDR uses "ku" for // GetLocaleInfo() maps such LCID to "ku". However, CLDR uses "ku" for
// Northern Kurdish and "ckb" for Central Kurdish. For this reason, we cannot // Northern Kurdish and "ckb" for Central Kurdish. For this reason, we cannot
// use the Windows API to resolve locale ID for this specific case. // use the Windows API to resolve locale ID for this specific case.
if ((hostid & 0x3FF) != 0x92) { if ((hostid & 0x3FF) != 0x92) {
int32_t tmpLen = 0; int32_t tmpLen = 0;
char locName[157]; /* ULOC_FULLNAME_CAPACITY */ UChar windowsLocaleName[LOCALE_NAME_MAX_LENGTH]; // ULOC_FULLNAME_CAPACITY > LOCALE_NAME_MAX_LENGTH
char locName[LOCALE_NAME_MAX_LENGTH]; // ICU name can't be longer than Windows name
tmpLen = GetLocaleInfoA(hostid, LOCALE_SNAME, (LPSTR)locName, UPRV_LENGTHOF(locName)); // Note: LOCALE_ALLOW_NEUTRAL_NAMES was enabled in Windows7+, prior versions did not handle neutral (no-region) locale names.
tmpLen = LCIDToLocaleName(hostid, (PWSTR)windowsLocaleName, UPRV_LENGTHOF(windowsLocaleName), LOCALE_ALLOW_NEUTRAL_NAMES);
if (tmpLen > 1) { if (tmpLen > 1) {
/* Windows locale name may contain sorting variant, such as "es-ES_tradnl". int32_t i = 0;
In such case, we need special mapping data found in the hardcoded table // Only need to look up in table if have _, eg for de-de_phoneb type alternate sort.
in this source file. */
char *p = uprv_strchr(locName, '_');
if (p) {
/* Keep the base locale, without variant */
*p = 0;
tmpLen = uprv_strlen(locName);
}
else {
/* No hardcoded table lookup necessary */
bLookup = FALSE; bLookup = FALSE;
for (i = 0; i < UPRV_LENGTHOF(locName); i++)
{
locName[i] = (char)(windowsLocaleName[i]);
// Windows locale name may contain sorting variant, such as "es-ES_tradnl".
// In such cases, we need special mapping data found in the hardcoded table
// in this source file.
if (windowsLocaleName[i] == L'_')
{
// Keep the base locale, without variant
// TODO: Should these be mapped from _phoneb to @collation=phonebook, etc.?
locName[i] = '\0';
tmpLen = i;
bLookup = TRUE;
break;
} }
/* Change the tag separator from '-' to '_' */ else if (windowsLocaleName[i] == L'-')
p = locName; {
while (*p) { // Windows names use -, ICU uses _
if (*p == '-') { locName[i] = '_';
*p = '_';
} }
p++; else if (windowsLocaleName[i] == L'\0')
{
// No point in doing more work than necessary
break;
} }
}
// TODO: Need to understand this better, why isn't it an alias?
FIX_LANGUAGE_ID_TAG(locName, tmpLen); FIX_LANGUAGE_ID_TAG(locName, tmpLen);
pPosixID = locName; pPosixID = locName;
} }
} }
#endif #endif // USE_WINDOWS_LCID_MAPPING_API
if (bLookup) { if (bLookup) {
const char *pCandidate = NULL; const char *pCandidate = NULL;
langID = LANGUAGE_LCID(hostid); langID = LANGUAGE_LCID(hostid);
@ -1101,15 +1129,101 @@ uprv_convertToPosix(uint32_t hostid, char *posixID, int32_t posixIDCapacity, UEr
// POSIX --> LCID // POSIX --> LCID
// This should only be called from uloc_getLCID. // This should only be called from uloc_getLCID.
// The locale ID must be in canonical form. // The locale ID must be in canonical form.
// langID is separate so that this file doesn't depend on the uloc_* API.
// //
///////////////////////////////////// /////////////////////////////////////
*/ */
U_CAPI uint32_t
uprv_convertToLCIDPlatform(const char* localeID)
{
// The purpose of this function is to leverage native platform name->lcid
// conversion functionality when available.
#ifdef USE_WINDOWS_LCID_MAPPING_API
DWORD nameLCIDFlags = 0;
UErrorCode myStatus = U_ZERO_ERROR;
// First check for a Windows name->LCID match, fall through to catch
// ICU special cases, but Windows may know it already.
#if LOCALE_ALLOW_NEUTRAL_NAMES
nameLCIDFlags = LOCALE_ALLOW_NEUTRAL_NAMES;
#endif /* LOCALE_ALLOW_NEUTRAL_NAMES */
int32_t len;
char collVal[ULOC_KEYWORDS_CAPACITY] = {};
char baseName[ULOC_FULLNAME_CAPACITY] = {};
const char * mylocaleID = localeID;
// Check any for keywords.
if (uprv_strchr(localeID, '@'))
{
len = uloc_getKeywordValue(localeID, "collation", collVal, UPRV_LENGTHOF(collVal) - 1, &myStatus);
if (U_SUCCESS(myStatus) && len > 0)
{
// If it contains the keyword collation, return 0 so that the LCID lookup table will be used.
return 0;
}
else
{
// If the locale ID contains keywords other than collation, just use the base name.
len = uloc_getBaseName(localeID, baseName, UPRV_LENGTHOF(baseName) - 1, &myStatus);
if (U_SUCCESS(myStatus) && len > 0)
{
baseName[len] = 0;
mylocaleID = baseName;
}
}
}
char asciiBCP47Tag[LOCALE_NAME_MAX_LENGTH] = {};
// this will change it from de_DE@collation=phonebook to de-DE-u-co-phonebk form
int32_t bcp47Len = uloc_toLanguageTag(mylocaleID, asciiBCP47Tag, UPRV_LENGTHOF(asciiBCP47Tag), FALSE, &myStatus);
if (U_SUCCESS(myStatus))
{
// Need it to be UTF-16, not 8-bit
wchar_t bcp47Tag[LOCALE_NAME_MAX_LENGTH] = {};
int32_t i;
for (i = 0; i < UPRV_LENGTHOF(bcp47Tag); i++)
{
if (asciiBCP47Tag[i] == '\0')
{
break;
}
else
{
// Copy the character
bcp47Tag[i] = static_cast<wchar_t>(asciiBCP47Tag[i]);
}
}
if (i < (UPRV_LENGTHOF(bcp47Tag) - 1))
{
// Ensure it's null terminated
bcp47Tag[i] = L'\0';
LCID lcid = LocaleNameToLCID(bcp47Tag, nameLCIDFlags);
if (lcid > 0)
{
// Found LCID from windows, return that one, unless its completely ambiguous
// LOCALE_USER_DEFAULT and transients are OK because they will round trip
// for this process.
if (lcid != LOCALE_CUSTOM_UNSPECIFIED)
{
return lcid;
}
}
}
}
#endif /* USE_WINDOWS_LCID_MAPPING_API */
// No found, or not implemented on platforms without native name->lcid conversion
return 0;
}
U_CAPI uint32_t U_CAPI uint32_t
uprv_convertToLCID(const char *langID, const char* posixID, UErrorCode* status) uprv_convertToLCID(const char *langID, const char* posixID, UErrorCode* status)
{ {
// This function does the table lookup when native platform name->lcid conversion isn't available,
// or for locales that don't follow patterns the platform expects.
uint32_t low = 0; uint32_t low = 0;
uint32_t high = gLocaleCount; uint32_t high = gLocaleCount;
uint32_t mid; uint32_t mid;

5
deps/icu-small/source/common/locmap.h

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
****************************************************************************** ******************************************************************************
@ -32,7 +32,8 @@
U_CAPI int32_t uprv_convertToPosix(uint32_t hostid, char* posixID, int32_t posixIDCapacity, UErrorCode* status); U_CAPI int32_t uprv_convertToPosix(uint32_t hostid, char* posixID, int32_t posixIDCapacity, UErrorCode* status);
/* Don't call this function directly. Use uloc_getLCID instead. */ /* Don't call these functions directly. Use uloc_getLCID instead. */
U_CAPI uint32_t uprv_convertToLCIDPlatform(const char *localeID); // Leverage platform conversion if possible
U_CAPI uint32_t uprv_convertToLCID(const char *langID, const char* posixID, UErrorCode* status); U_CAPI uint32_t uprv_convertToLCID(const char *langID, const char* posixID, UErrorCode* status);
#endif /* LOCMAP_H */ #endif /* LOCMAP_H */

4
deps/icu-small/source/common/locresdata.cpp

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
******************************************************************************* *******************************************************************************
@ -8,7 +8,7 @@
* *
******************************************************************************* *******************************************************************************
* file name: loclikely.cpp * file name: loclikely.cpp
* encoding: US-ASCII * encoding: UTF-8
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *

2
deps/icu-small/source/common/locutil.cpp

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
******************************************************************************* *******************************************************************************

2
deps/icu-small/source/common/locutil.h

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/** /**
******************************************************************************* *******************************************************************************

4
deps/icu-small/source/common/messageimpl.h

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
******************************************************************************* *******************************************************************************
@ -6,7 +6,7 @@
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
******************************************************************************* *******************************************************************************
* file name: messageimpl.h * file name: messageimpl.h
* encoding: US-ASCII * encoding: UTF-8
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *

4
deps/icu-small/source/common/messagepattern.cpp

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
******************************************************************************* *******************************************************************************
@ -6,7 +6,7 @@
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
******************************************************************************* *******************************************************************************
* file name: messagepattern.cpp * file name: messagepattern.cpp
* encoding: US-ASCII * encoding: UTF-8
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *

2
deps/icu-small/source/common/msvcres.h

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
//{{NO_DEPENDENCIES}} //{{NO_DEPENDENCIES}}
// Copyright (c) 2003-2010 International Business Machines // Copyright (c) 2003-2010 International Business Machines

2
deps/icu-small/source/common/mutex.h

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
****************************************************************************** ******************************************************************************

2
deps/icu-small/source/common/norm2_nfc_data.h

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
* Copyright (C) 1999-2016, International Business Machines * Copyright (C) 1999-2016, International Business Machines

2
deps/icu-small/source/common/norm2allmodes.h

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
******************************************************************************* *******************************************************************************

4
deps/icu-small/source/common/normalizer2.cpp

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
******************************************************************************* *******************************************************************************
@ -8,7 +8,7 @@
* *
******************************************************************************* *******************************************************************************
* file name: normalizer2.cpp * file name: normalizer2.cpp
* encoding: US-ASCII * encoding: UTF-8
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *

4
deps/icu-small/source/common/normalizer2impl.cpp

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
******************************************************************************* *******************************************************************************
@ -8,7 +8,7 @@
* *
******************************************************************************* *******************************************************************************
* file name: normalizer2impl.cpp * file name: normalizer2impl.cpp
* encoding: US-ASCII * encoding: UTF-8
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *

6
deps/icu-small/source/common/normalizer2impl.h

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
******************************************************************************* *******************************************************************************
@ -8,7 +8,7 @@
* *
******************************************************************************* *******************************************************************************
* file name: normalizer2impl.h * file name: normalizer2impl.h
* encoding: US-ASCII * encoding: UTF-8
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *
@ -176,7 +176,7 @@ public:
lastCC=0; lastCC=0;
} }
void copyReorderableSuffixTo(UnicodeString &s) const { void copyReorderableSuffixTo(UnicodeString &s) const {
s.setTo(reorderStart, (int32_t)(limit-reorderStart)); s.setTo(ConstChar16Ptr(reorderStart), (int32_t)(limit-reorderStart));
} }
private: private:
/* /*

12
deps/icu-small/source/common/normlzr.cpp

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
************************************************************************* *************************************************************************
@ -23,6 +23,12 @@
#include "normalizer2impl.h" #include "normalizer2impl.h"
#include "uprops.h" // for uniset_getUnicode32Instance() #include "uprops.h" // for uniset_getUnicode32Instance()
#if defined(_ARM64_) && defined(move32)
// System can define move32 intrinsics, but the char iters define move32 method
// using same undef trick in headers, so undef here to re-enable the method.
#undef move32
#endif
U_NAMESPACE_BEGIN U_NAMESPACE_BEGIN
UOBJECT_DEFINE_RTTI_IMPLEMENTATION(Normalizer) UOBJECT_DEFINE_RTTI_IMPLEMENTATION(Normalizer)
@ -40,7 +46,7 @@ Normalizer::Normalizer(const UnicodeString& str, UNormalizationMode mode) :
init(); init();
} }
Normalizer::Normalizer(const UChar *str, int32_t length, UNormalizationMode mode) : Normalizer::Normalizer(ConstChar16Ptr str, int32_t length, UNormalizationMode mode) :
UObject(), fFilteredNorm2(NULL), fNorm2(NULL), fUMode(mode), fOptions(0), UObject(), fFilteredNorm2(NULL), fNorm2(NULL), fUMode(mode), fOptions(0),
text(new UCharCharacterIterator(str, length)), text(new UCharCharacterIterator(str, length)),
currentIndex(0), nextIndex(0), currentIndex(0), nextIndex(0),
@ -435,7 +441,7 @@ Normalizer::setText(const CharacterIterator& newText,
} }
void void
Normalizer::setText(const UChar* newText, Normalizer::setText(ConstChar16Ptr newText,
int32_t length, int32_t length,
UErrorCode &status) UErrorCode &status)
{ {

2
deps/icu-small/source/common/parsepos.cpp

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
********************************************************************** **********************************************************************

4
deps/icu-small/source/common/patternprops.cpp

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
******************************************************************************* *******************************************************************************
@ -6,7 +6,7 @@
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
******************************************************************************* *******************************************************************************
* file name: patternprops.cpp * file name: patternprops.cpp
* encoding: US-ASCII * encoding: UTF-8
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *

4
deps/icu-small/source/common/patternprops.h

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
******************************************************************************* *******************************************************************************
@ -6,7 +6,7 @@
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
******************************************************************************* *******************************************************************************
* file name: patternprops.h * file name: patternprops.h
* encoding: US-ASCII * encoding: UTF-8
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *

2
deps/icu-small/source/common/pluralmap.cpp

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
* Copyright (C) 2015, International Business Machines Corporation and * Copyright (C) 2015, International Business Machines Corporation and

2
deps/icu-small/source/common/pluralmap.h

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
****************************************************************************** ******************************************************************************

2
deps/icu-small/source/common/propname.cpp

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
********************************************************************** **********************************************************************

2
deps/icu-small/source/common/propname.h

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
********************************************************************** **********************************************************************

2
deps/icu-small/source/common/propname_data.h

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
// //
// Copyright (C) 1999-2016, International Business Machines // Copyright (C) 1999-2016, International Business Machines

6
deps/icu-small/source/common/propsvec.c → deps/icu-small/source/common/propsvec.cpp

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
******************************************************************************* *******************************************************************************
@ -8,7 +8,7 @@
* *
******************************************************************************* *******************************************************************************
* file name: propsvec.c * file name: propsvec.c
* encoding: US-ASCII * encoding: UTF-8
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *
@ -499,6 +499,8 @@ upvec_compactToUTrie2Handler(void *context,
UChar32 start, UChar32 end, UChar32 start, UChar32 end,
int32_t rowIndex, uint32_t *row, int32_t columns, int32_t rowIndex, uint32_t *row, int32_t columns,
UErrorCode *pErrorCode) { UErrorCode *pErrorCode) {
(void)row;
(void)columns;
UPVecToUTrie2Context *toUTrie2=(UPVecToUTrie2Context *)context; UPVecToUTrie2Context *toUTrie2=(UPVecToUTrie2Context *)context;
if(start<UPVEC_FIRST_SPECIAL_CP) { if(start<UPVEC_FIRST_SPECIAL_CP) {
utrie2_setRange32(toUTrie2->trie, start, end, (uint32_t)rowIndex, TRUE, pErrorCode); utrie2_setRange32(toUTrie2->trie, start, end, (uint32_t)rowIndex, TRUE, pErrorCode);

4
deps/icu-small/source/common/propsvec.h

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
******************************************************************************* *******************************************************************************
@ -8,7 +8,7 @@
* *
******************************************************************************* *******************************************************************************
* file name: propsvec.h * file name: propsvec.h
* encoding: US-ASCII * encoding: UTF-8
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *

4
deps/icu-small/source/common/punycode.cpp

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
******************************************************************************* *******************************************************************************
@ -8,7 +8,7 @@
* *
******************************************************************************* *******************************************************************************
* file name: punycode.cpp * file name: punycode.cpp
* encoding: US-ASCII * encoding: UTF-8
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *

4
deps/icu-small/source/common/punycode.h

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
******************************************************************************* *******************************************************************************
@ -8,7 +8,7 @@
* *
******************************************************************************* *******************************************************************************
* file name: punycode.h * file name: punycode.h
* encoding: US-ASCII * encoding: UTF-8
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *

274
deps/icu-small/source/common/putil.cpp

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
****************************************************************************** ******************************************************************************
@ -43,8 +43,24 @@
// Must be before any other #includes. // Must be before any other #includes.
#include "uposixdefs.h" #include "uposixdefs.h"
/* include ICU headers */ // First, the platform type. Need this for U_PLATFORM.
#include "unicode/utypes.h" #include "unicode/platform.h"
#if U_PLATFORM == U_PF_MINGW && defined __STRICT_ANSI__
/* tzset isn't defined in strict ANSI on MinGW. */
#undef __STRICT_ANSI__
#endif
/*
* Cygwin with GCC requires inclusion of time.h after the above disabling strict asci mode statement.
*/
#include <time.h>
#if !U_PLATFORM_USES_ONLY_WIN32_API
#include <sys/time.h>
#endif
/* include the rest of the ICU headers */
#include "unicode/putil.h" #include "unicode/putil.h"
#include "unicode/ustring.h" #include "unicode/ustring.h"
#include "putilimp.h" #include "putilimp.h"
@ -76,14 +92,29 @@
* Should Cygwin be included as well (U_PLATFORM_HAS_WIN32_API) * Should Cygwin be included as well (U_PLATFORM_HAS_WIN32_API)
* to use native APIs as much as possible? * to use native APIs as much as possible?
*/ */
#ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN # define WIN32_LEAN_AND_MEAN
#endif
# define VC_EXTRALEAN # define VC_EXTRALEAN
# define NOUSER # define NOUSER
# define NOSERVICE # define NOSERVICE
# define NOIME # define NOIME
# define NOMCX # define NOMCX
# include <windows.h> # include <windows.h>
# include "unicode\uloc.h"
#if U_PLATFORM_HAS_WINUWP_API == 0
# include "wintz.h" # include "wintz.h"
#else // U_PLATFORM_HAS_WINUWP_API
typedef PVOID LPMSG; // TODO: figure out how to get rid of this typedef
#include <Windows.Globalization.h>
#include <windows.system.userprofile.h>
#include <wrl\wrappers\corewrappers.h>
#include <wrl\client.h>
using namespace ABI::Windows::Foundation;
using namespace Microsoft::WRL;
using namespace Microsoft::WRL::Wrappers;
#endif
#elif U_PLATFORM == U_PF_OS400 #elif U_PLATFORM == U_PF_OS400
# include <float.h> # include <float.h>
# include <qusec.h> /* error code structure */ # include <qusec.h> /* error code structure */
@ -104,20 +135,6 @@
# include <sys/neutrino.h> # include <sys/neutrino.h>
#endif #endif
#if (U_PF_MINGW <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN) && defined(__STRICT_ANSI__)
/* tzset isn't defined in strict ANSI on Cygwin and MinGW. */
#undef __STRICT_ANSI__
#endif
/*
* Cygwin with GCC requires inclusion of time.h after the above disabling strict asci mode statement.
*/
#include <time.h>
#if !U_PLATFORM_USES_ONLY_WIN32_API
#include <sys/time.h>
#endif
/* /*
* Only include langinfo.h if we have a way to get the codeset. If we later * Only include langinfo.h if we have a way to get the codeset. If we later
* depend on more feature, we can test on U_HAVE_NL_LANGINFO. * depend on more feature, we can test on U_HAVE_NL_LANGINFO.
@ -651,7 +668,7 @@ uprv_timezone()
/* Note that U_TZNAME does *not* have to be tzname, but if it is, /* Note that U_TZNAME does *not* have to be tzname, but if it is,
some platforms need to have it declared here. */ some platforms need to have it declared here. */
#if defined(U_TZNAME) && (U_PLATFORM == U_PF_IRIX || U_PLATFORM_IS_DARWIN_BASED || (U_PLATFORM == U_PF_CYGWIN && !U_PLATFORM_USES_ONLY_WIN32_API)) #if defined(U_TZNAME) && (U_PLATFORM == U_PF_IRIX || U_PLATFORM_IS_DARWIN_BASED)
/* RS6000 and others reject char **tzname. */ /* RS6000 and others reject char **tzname. */
extern U_IMPORT char *U_TZNAME[]; extern U_IMPORT char *U_TZNAME[];
#endif #endif
@ -1008,16 +1025,65 @@ uprv_tzname_clear_cache()
#endif #endif
} }
// With the Universal Windows Platform we can just ask Windows for the name
#if U_PLATFORM_HAS_WINUWP_API
U_CAPI const char* U_EXPORT2
uprv_getWindowsTimeZone()
{
// Get default Windows timezone.
ComPtr<IInspectable> calendar;
HRESULT hr = RoActivateInstance(
HStringReference(RuntimeClass_Windows_Globalization_Calendar).Get(),
&calendar);
if (SUCCEEDED(hr))
{
ComPtr<ABI::Windows::Globalization::ITimeZoneOnCalendar> timezone;
hr = calendar.As(&timezone);
if (SUCCEEDED(hr))
{
HString timezoneString;
hr = timezone->GetTimeZone(timezoneString.GetAddressOf());
if (SUCCEEDED(hr))
{
int32_t length = wcslen(timezoneString.GetRawBuffer(NULL));
char* asciiId = (char*)uprv_calloc(length + 1, sizeof(char));
if (asciiId != nullptr)
{
u_UCharsToChars((UChar*)timezoneString.GetRawBuffer(NULL), asciiId, length);
return asciiId;
}
}
}
}
// Failed
return nullptr;
}
#endif
U_CAPI const char* U_EXPORT2 U_CAPI const char* U_EXPORT2
uprv_tzname(int n) uprv_tzname(int n)
{ {
const char *tzid = NULL; const char *tzid = NULL;
#if U_PLATFORM_USES_ONLY_WIN32_API #if U_PLATFORM_USES_ONLY_WIN32_API
#if U_PLATFORM_HAS_WINUWP_API > 0
tzid = uprv_getWindowsTimeZone();
#else
tzid = uprv_detectWindowsTimeZone(); tzid = uprv_detectWindowsTimeZone();
#endif
if (tzid != NULL) { if (tzid != NULL) {
return tzid; return tzid;
} }
#ifndef U_TZNAME
// The return value is free'd in timezone.cpp on Windows because
// the other code path returns a pointer to a heap location.
// If we don't have a name already, then tzname wouldn't be any
// better, so just fall back.
return uprv_strdup("Etc/UTC");
#endif // !U_TZNAME
#else #else
/*#if U_PLATFORM_IS_DARWIN_BASED /*#if U_PLATFORM_IS_DARWIN_BASED
@ -1162,7 +1228,8 @@ UInitOnce gTimeZoneFilesInitOnce = U_INITONCE_INITIALIZER;
static CharString *gTimeZoneFilesDirectory = NULL; static CharString *gTimeZoneFilesDirectory = NULL;
#if U_POSIX_LOCALE || U_PLATFORM_USES_ONLY_WIN32_API #if U_POSIX_LOCALE || U_PLATFORM_USES_ONLY_WIN32_API
static char *gCorrectedPOSIXLocale = NULL; /* Heap allocated */ static char *gCorrectedPOSIXLocale = NULL; /* Sometimes heap allocated */
static bool gCorrectedPOSIXLocaleHeapAllocated = false;
#endif #endif
static UBool U_CALLCONV putil_cleanup(void) static UBool U_CALLCONV putil_cleanup(void)
@ -1183,9 +1250,10 @@ static UBool U_CALLCONV putil_cleanup(void)
#endif #endif
#if U_POSIX_LOCALE || U_PLATFORM_USES_ONLY_WIN32_API #if U_POSIX_LOCALE || U_PLATFORM_USES_ONLY_WIN32_API
if (gCorrectedPOSIXLocale) { if (gCorrectedPOSIXLocale && gCorrectedPOSIXLocaleHeapAllocated) {
uprv_free(gCorrectedPOSIXLocale); uprv_free(gCorrectedPOSIXLocale);
gCorrectedPOSIXLocale = NULL; gCorrectedPOSIXLocale = NULL;
gCorrectedPOSIXLocaleHeapAllocated = false;
} }
#endif #endif
return TRUE; return TRUE;
@ -1297,7 +1365,9 @@ static void U_CALLCONV dataDirectoryInitFn() {
*/ */
# if !defined(ICU_NO_USER_DATA_OVERRIDE) && !UCONFIG_NO_FILE_IO # if !defined(ICU_NO_USER_DATA_OVERRIDE) && !UCONFIG_NO_FILE_IO
/* First try to get the environment variable */ /* First try to get the environment variable */
# if U_PLATFORM_HAS_WINUWP_API == 0 // Windows UWP does not support getenv
path=getenv("ICU_DATA"); path=getenv("ICU_DATA");
# endif
# endif # endif
/* ICU_DATA_DIR may be set as a compile option. /* ICU_DATA_DIR may be set as a compile option.
@ -1326,9 +1396,35 @@ static void U_CALLCONV dataDirectoryInitFn() {
} }
#endif #endif
#if defined(ICU_DATA_DIR_WINDOWS) && U_PLATFORM_HAS_WINUWP_API != 0
// Use data from the %windir%\globalization\icu directory
// This is only available if ICU is built as a system component
char datadir_path_buffer[MAX_PATH];
UINT length = GetWindowsDirectoryA(datadir_path_buffer, UPRV_LENGTHOF(datadir_path_buffer));
if (length > 0 && length < (UPRV_LENGTHOF(datadir_path_buffer) - sizeof(ICU_DATA_DIR_WINDOWS) - 1))
{
if (datadir_path_buffer[length - 1] != '\\')
{
datadir_path_buffer[length++] = '\\';
datadir_path_buffer[length] = '\0';
}
if ((length + 1 + sizeof(ICU_DATA_DIR_WINDOWS)) < UPRV_LENGTHOF(datadir_path_buffer))
{
uprv_strcat(datadir_path_buffer, ICU_DATA_DIR_WINDOWS);
path = datadir_path_buffer;
}
}
#endif
if(path==NULL) { if(path==NULL) {
/* It looks really bad, set it to something. */ /* It looks really bad, set it to something. */
#if U_PLATFORM_HAS_WIN32_API
// Windows UWP will require icudtl.dat file in same directory as icuuc.dll
path = ".\\";
#else
path = ""; path = "";
#endif
} }
u_setDataDirectory(path); u_setDataDirectory(path);
@ -1366,7 +1462,12 @@ static void U_CALLCONV TimeZoneDataDirInitFn(UErrorCode &status) {
status = U_MEMORY_ALLOCATION_ERROR; status = U_MEMORY_ALLOCATION_ERROR;
return; return;
} }
#if U_PLATFORM_HAS_WINUWP_API == 0
const char *dir = getenv("ICU_TIMEZONE_FILES_DIR"); const char *dir = getenv("ICU_TIMEZONE_FILES_DIR");
#else
// TODO: UWP does not support alternate timezone data directories at this time
const char *dir = "";
#endif // U_PLATFORM_HAS_WINUWP_API
#if defined(U_TIMEZONE_FILES_DIR) #if defined(U_TIMEZONE_FILES_DIR)
if (dir == NULL) { if (dir == NULL) {
dir = TO_STRING(U_TIMEZONE_FILES_DIR); dir = TO_STRING(U_TIMEZONE_FILES_DIR);
@ -1603,6 +1704,7 @@ The leftmost codepage (.xxx) wins.
if (gCorrectedPOSIXLocale == NULL) { if (gCorrectedPOSIXLocale == NULL) {
gCorrectedPOSIXLocale = correctedPOSIXLocale; gCorrectedPOSIXLocale = correctedPOSIXLocale;
gCorrectedPOSIXLocaleHeapAllocated = true;
ucln_common_registerCleanup(UCLN_COMMON_PUTIL, putil_cleanup); ucln_common_registerCleanup(UCLN_COMMON_PUTIL, putil_cleanup);
correctedPOSIXLocale = NULL; correctedPOSIXLocale = NULL;
} }
@ -1618,25 +1720,115 @@ The leftmost codepage (.xxx) wins.
UErrorCode status = U_ZERO_ERROR; UErrorCode status = U_ZERO_ERROR;
char *correctedPOSIXLocale = 0; char *correctedPOSIXLocale = 0;
// If we have already figured this out just use the cached value
if (gCorrectedPOSIXLocale != NULL) { if (gCorrectedPOSIXLocale != NULL) {
return gCorrectedPOSIXLocale; return gCorrectedPOSIXLocale;
} }
LCID id = GetThreadLocale(); // No cached value, need to determine the current value
correctedPOSIXLocale = static_cast<char *>(uprv_malloc(POSIX_LOCALE_CAPACITY + 1)); static WCHAR windowsLocale[LOCALE_NAME_MAX_LENGTH];
if (correctedPOSIXLocale) { #if U_PLATFORM_HAS_WINUWP_API == 0
int32_t posixLen = uprv_convertToPosix(id, correctedPOSIXLocale, POSIX_LOCALE_CAPACITY, &status); // If not a Universal Windows App, we'll need user default language.
if (U_SUCCESS(status)) { // Vista and above should use Locale Names instead of LCIDs
int length = GetUserDefaultLocaleName(windowsLocale, UPRV_LENGTHOF(windowsLocale));
#else
// In a UWP app, we want the top language that the application and user agreed upon
ComPtr<ABI::Windows::Foundation::Collections::IVectorView<HSTRING>> languageList;
ComPtr<ABI::Windows::Globalization::IApplicationLanguagesStatics> applicationLanguagesStatics;
HRESULT hr = GetActivationFactory(
HStringReference(RuntimeClass_Windows_Globalization_ApplicationLanguages).Get(),
&applicationLanguagesStatics);
if (SUCCEEDED(hr))
{
hr = applicationLanguagesStatics->get_Languages(&languageList);
}
if (FAILED(hr))
{
// If there is no application context, then use the top language from the user language profile
ComPtr<ABI::Windows::System::UserProfile::IGlobalizationPreferencesStatics> globalizationPreferencesStatics;
hr = GetActivationFactory(
HStringReference(RuntimeClass_Windows_System_UserProfile_GlobalizationPreferences).Get(),
&globalizationPreferencesStatics);
if (SUCCEEDED(hr))
{
hr = globalizationPreferencesStatics->get_Languages(&languageList);
}
}
// We have a list of languages, ICU knows one, so use the top one for our locale
HString topLanguage;
if (SUCCEEDED(hr))
{
hr = languageList->GetAt(0, topLanguage.GetAddressOf());
}
if (FAILED(hr))
{
// Unexpected, use en-US by default
if (gCorrectedPOSIXLocale == NULL) {
gCorrectedPOSIXLocale = "en_US";
}
return gCorrectedPOSIXLocale;
}
// ResolveLocaleName will get a likely subtags form consistent with Windows behavior.
int length = ResolveLocaleName(topLanguage.GetRawBuffer(NULL), windowsLocale, UPRV_LENGTHOF(windowsLocale));
#endif
// Now we should have a Windows locale name that needs converted to the POSIX style,
if (length > 0)
{
// First we need to go from UTF-16 to char (and also convert from _ to - while we're at it.)
char modifiedWindowsLocale[LOCALE_NAME_MAX_LENGTH];
int32_t i;
for (i = 0; i < UPRV_LENGTHOF(modifiedWindowsLocale); i++)
{
if (windowsLocale[i] == '_')
{
modifiedWindowsLocale[i] = '-';
}
else
{
modifiedWindowsLocale[i] = static_cast<char>(windowsLocale[i]);
}
if (modifiedWindowsLocale[i] == '\0')
{
break;
}
}
if (i >= UPRV_LENGTHOF(modifiedWindowsLocale))
{
// Ran out of room, can't really happen, maybe we'll be lucky about a matching
// locale when tags are dropped
modifiedWindowsLocale[UPRV_LENGTHOF(modifiedWindowsLocale) - 1] = '\0';
}
// Now normalize the resulting name
if (correctedPOSIXLocale)
{
int32_t posixLen = uloc_canonicalize(modifiedWindowsLocale, correctedPOSIXLocale, POSIX_LOCALE_CAPACITY, &status);
if (U_SUCCESS(status))
{
*(correctedPOSIXLocale + posixLen) = 0; *(correctedPOSIXLocale + posixLen) = 0;
gCorrectedPOSIXLocale = correctedPOSIXLocale; gCorrectedPOSIXLocale = correctedPOSIXLocale;
gCorrectedPOSIXLocaleHeapAllocated = true;
ucln_common_registerCleanup(UCLN_COMMON_PUTIL, putil_cleanup); ucln_common_registerCleanup(UCLN_COMMON_PUTIL, putil_cleanup);
} else { }
else
{
uprv_free(correctedPOSIXLocale); uprv_free(correctedPOSIXLocale);
} }
} }
}
// If unable to find a locale we can agree upon, use en-US by default
if (gCorrectedPOSIXLocale == NULL) { if (gCorrectedPOSIXLocale == NULL) {
return "en_US"; gCorrectedPOSIXLocale = "en_US";
} }
return gCorrectedPOSIXLocale; return gCorrectedPOSIXLocale;
@ -1923,8 +2115,34 @@ int_getDefaultCodepage()
#elif U_PLATFORM_USES_ONLY_WIN32_API #elif U_PLATFORM_USES_ONLY_WIN32_API
static char codepage[64]; static char codepage[64];
sprintf(codepage, "windows-%d", GetACP()); DWORD codepageNumber = 0;
#if U_PLATFORM_HAS_WINUWP_API > 0
// UWP doesn't have a direct API to get the default ACP as Microsoft would rather
// have folks use Unicode than a "system" code page, however this is the same
// codepage as the system default locale codepage. (FWIW, the system locale is
// ONLY used for codepage, it should never be used for anything else)
GetLocaleInfoEx(LOCALE_NAME_SYSTEM_DEFAULT, LOCALE_IDEFAULTANSICODEPAGE | LOCALE_RETURN_NUMBER,
(LPWSTR)&codepageNumber, sizeof(codepageNumber) / sizeof(WCHAR));
#else
// Win32 apps can call GetACP
codepageNumber = GetACP();
#endif
// Special case for UTF-8
if (codepageNumber == 65001)
{
return "UTF-8";
}
// Windows codepages can look like windows-1252, so format the found number
// the numbers are eclectic, however all valid system code pages, besides UTF-8
// are between 3 and 19999
if (codepageNumber > 0 && codepageNumber < 20000)
{
sprintf(codepage, "windows-%ld", codepageNumber);
return codepage; return codepage;
}
// If the codepage number call failed then return UTF-8
return "UTF-8";
#elif U_POSIX_LOCALE #elif U_POSIX_LOCALE
static char codesetName[100]; static char codesetName[100];

10
deps/icu-small/source/common/putilimp.h

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
****************************************************************************** ******************************************************************************
@ -87,7 +87,7 @@ typedef size_t uintptr_t;
#ifdef U_HAVE_NL_LANGINFO_CODESET #ifdef U_HAVE_NL_LANGINFO_CODESET
/* Use the predefined value. */ /* Use the predefined value. */
#elif U_PLATFORM_HAS_WIN32_API || U_PLATFORM == U_PF_ANDROID || U_PLATFORM == U_PF_QNX #elif U_PLATFORM_USES_ONLY_WIN32_API || U_PLATFORM == U_PF_ANDROID || U_PLATFORM == U_PF_QNX
# define U_HAVE_NL_LANGINFO_CODESET 0 # define U_HAVE_NL_LANGINFO_CODESET 0
#else #else
# define U_HAVE_NL_LANGINFO_CODESET 1 # define U_HAVE_NL_LANGINFO_CODESET 1
@ -106,7 +106,10 @@ typedef size_t uintptr_t;
#ifdef U_TZSET #ifdef U_TZSET
/* Use the predefined value. */ /* Use the predefined value. */
#elif U_PLATFORM_USES_ONLY_WIN32_API #elif U_PLATFORM_USES_ONLY_WIN32_API
// UWP doesn't support tzset or environment variables for tz
#if U_PLATFORM_HAS_WINUWP_API == 0
# define U_TZSET _tzset # define U_TZSET _tzset
#endif
#elif U_PLATFORM == U_PF_OS400 #elif U_PLATFORM == U_PF_OS400
/* not defined */ /* not defined */
#else #else
@ -141,7 +144,10 @@ typedef size_t uintptr_t;
#ifdef U_TZNAME #ifdef U_TZNAME
/* Use the predefined value. */ /* Use the predefined value. */
#elif U_PLATFORM_USES_ONLY_WIN32_API #elif U_PLATFORM_USES_ONLY_WIN32_API
/* not usable on all windows platforms */
#if U_PLATFORM_HAS_WINUWP_API == 0
# define U_TZNAME _tzname # define U_TZNAME _tzname
#endif
#elif U_PLATFORM == U_PF_OS400 #elif U_PLATFORM == U_PF_OS400
/* not defined */ /* not defined */
#else #else

2
deps/icu-small/source/common/rbbi.cpp

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
*************************************************************************** ***************************************************************************

2
deps/icu-small/source/common/rbbidata.cpp

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
*************************************************************************** ***************************************************************************

4
deps/icu-small/source/common/rbbidata.h

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
******************************************************************************* *******************************************************************************
@ -8,7 +8,7 @@
* *
******************************************************************************* *******************************************************************************
* file name: rbbidata.h * file name: rbbidata.h
* encoding: US-ASCII * encoding: UTF-8
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *

2
deps/icu-small/source/common/rbbinode.cpp

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
*************************************************************************** ***************************************************************************

2
deps/icu-small/source/common/rbbinode.h

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/******************************************************************** /********************************************************************
* COPYRIGHT: * COPYRIGHT:

2
deps/icu-small/source/common/rbbirb.cpp

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
// //
// file: rbbirb.cpp // file: rbbirb.cpp

2
deps/icu-small/source/common/rbbirb.h

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
// //
// rbbirb.h // rbbirb.h

2
deps/icu-small/source/common/rbbirpt.h

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
//--------------------------------------------------------------------------------- //---------------------------------------------------------------------------------
// //

9
deps/icu-small/source/common/rbbiscan.cpp

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
// //
// file: rbbiscan.cpp // file: rbbiscan.cpp
@ -1179,13 +1179,12 @@ RBBINode *RBBIRuleScanner::pushNewNode(RBBINode::NodeType t) {
if (U_FAILURE(*fRB->fStatus)) { if (U_FAILURE(*fRB->fStatus)) {
return NULL; return NULL;
} }
fNodeStackPtr++; if (fNodeStackPtr >= kStackSize - 1) {
if (fNodeStackPtr >= kStackSize) { error(U_BRK_RULE_SYNTAX);
error(U_BRK_INTERNAL_ERROR);
RBBIDebugPuts("RBBIRuleScanner::pushNewNode - stack overflow."); RBBIDebugPuts("RBBIRuleScanner::pushNewNode - stack overflow.");
*fRB->fStatus = U_BRK_INTERNAL_ERROR;
return NULL; return NULL;
} }
fNodeStackPtr++;
fNodeStack[fNodeStackPtr] = new RBBINode(t); fNodeStack[fNodeStackPtr] = new RBBINode(t);
if (fNodeStack[fNodeStackPtr] == NULL) { if (fNodeStack[fNodeStackPtr] == NULL) {
*fRB->fStatus = U_MEMORY_ALLOCATION_ERROR; *fRB->fStatus = U_MEMORY_ALLOCATION_ERROR;

2
deps/icu-small/source/common/rbbiscan.h

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
// //
// rbbiscan.h // rbbiscan.h

2
deps/icu-small/source/common/rbbisetb.cpp

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
// //
// rbbisetb.cpp // rbbisetb.cpp

2
deps/icu-small/source/common/rbbisetb.h

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
// //
// rbbisetb.h // rbbisetb.h

2
deps/icu-small/source/common/rbbistbl.cpp

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
// //
// file: rbbistbl.cpp Implementation of the ICU RBBISymbolTable class // file: rbbistbl.cpp Implementation of the ICU RBBISymbolTable class

2
deps/icu-small/source/common/rbbitblb.cpp

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
********************************************************************** **********************************************************************

2
deps/icu-small/source/common/rbbitblb.h

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
// //
// rbbitblb.h // rbbitblb.h

2
deps/icu-small/source/common/resbund.cpp

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
********************************************************************** **********************************************************************

4
deps/icu-small/source/common/resbund_cnv.cpp

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
******************************************************************************* *******************************************************************************
@ -8,7 +8,7 @@
* *
******************************************************************************* *******************************************************************************
* file name: resbund_cnv.cpp * file name: resbund_cnv.cpp
* encoding: US-ASCII * encoding: UTF-8
* tab size: 8 (not used) * tab size: 8 (not used)
* indentation:4 * indentation:4
* *

2
deps/icu-small/source/common/resource.cpp

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
******************************************************************************* *******************************************************************************

2
deps/icu-small/source/common/resource.h

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
******************************************************************************* *******************************************************************************

2
deps/icu-small/source/common/ruleiter.cpp

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
********************************************************************** **********************************************************************

2
deps/icu-small/source/common/ruleiter.h

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others. // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html // License & terms of use: http://www.unicode.org/copyright.html
/* /*
********************************************************************** **********************************************************************

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save