diff options
author | Steven R. Loomis <srloomis@us.ibm.com> | 2017-09-21 15:31:38 -0700 |
---|---|---|
committer | Steven R. Loomis <srloomis@us.ibm.com> | 2017-11-09 18:25:58 -0800 |
commit | 44d3e17985befbd45457d5ad7f0a0387849e1b2f (patch) | |
tree | f75f2eddb868f13254b7f514875534dee616c0d6 /deps/icu-small/source/common/uloc.cpp | |
parent | 3b3ceafaf922e1d79950595eaa501aa412913820 (diff) | |
download | android-node-v8-44d3e17985befbd45457d5ad7f0a0387849e1b2f.tar.gz android-node-v8-44d3e17985befbd45457d5ad7f0a0387849e1b2f.tar.bz2 android-node-v8-44d3e17985befbd45457d5ad7f0a0387849e1b2f.zip |
deps: ICU 60 bump
- Update to released ICU 60.1, including:
- CLDR 32 (many new languages and data improvements)
- Unicode 10 (8,518 new characters, including four new scripts,
7,494 new Han characters, and 56 new emoji characters)
- UTF-8 malformed bytes now handled according to W3C/WHATWG spec
Fixes: https://github.com/nodejs/node/issues/15540
PR-URL: https://github.com/nodejs/node/pull/16876
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Diffstat (limited to 'deps/icu-small/source/common/uloc.cpp')
-rw-r--r-- | deps/icu-small/source/common/uloc.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/deps/icu-small/source/common/uloc.cpp b/deps/icu-small/source/common/uloc.cpp index 4d854bbcca..7a1dc723cf 100644 --- a/deps/icu-small/source/common/uloc.cpp +++ b/deps/icu-small/source/common/uloc.cpp @@ -98,6 +98,7 @@ locale_getKeywords(const char *localeID, */ /* Generated using org.unicode.cldr.icu.GenerateISO639LanguageTables */ /* ISO639 table version is 20150505 */ +/* Subsequent hand addition of selected languages */ static const char * const LANGUAGES[] = { "aa", "ab", "ace", "ach", "ada", "ady", "ae", "aeb", "af", "afh", "agq", "ain", "ak", "akk", "akz", "ale", @@ -109,7 +110,7 @@ static const char * const LANGUAGES[] = { "bgn", "bho", "bi", "bik", "bin", "bjn", "bkm", "bla", "bm", "bn", "bo", "bpy", "bqi", "br", "bra", "brh", "brx", "bs", "bss", "bua", "bug", "bum", "byn", "byv", - "ca", "cad", "car", "cay", "cch", "ce", "ceb", "cgg", + "ca", "cad", "car", "cay", "cch", "ccp", "ce", "ceb", "cgg", "ch", "chb", "chg", "chk", "chm", "chn", "cho", "chp", "chr", "chy", "ckb", "co", "cop", "cps", "cr", "crh", "cs", "csb", "cu", "cv", "cy", @@ -213,6 +214,7 @@ static const char* const REPLACEMENT_LANGUAGES[]={ */ /* Generated using org.unicode.cldr.icu.GenerateISO639LanguageTables */ /* ISO639 table version is 20150505 */ +/* Subsequent hand addition of selected languages */ static const char * const LANGUAGES_3[] = { "aar", "abk", "ace", "ach", "ada", "ady", "ave", "aeb", "afr", "afh", "agq", "ain", "aka", "akk", "akz", "ale", @@ -224,7 +226,7 @@ static const char * const LANGUAGES_3[] = { "bgn", "bho", "bis", "bik", "bin", "bjn", "bkm", "bla", "bam", "ben", "bod", "bpy", "bqi", "bre", "bra", "brh", "brx", "bos", "bss", "bua", "bug", "bum", "byn", "byv", - "cat", "cad", "car", "cay", "cch", "che", "ceb", "cgg", + "cat", "cad", "car", "cay", "cch", "ccp", "che", "ceb", "cgg", "cha", "chb", "chg", "chk", "chm", "chn", "cho", "chp", "chr", "chy", "ckb", "cos", "cop", "cps", "cre", "crh", "ces", "csb", "chu", "chv", "cym", @@ -529,14 +531,16 @@ static const VariantMap VARIANT_MAP[] = { #define _hasBCP47Extension(id) (id && uprv_strstr(id, "@") == NULL && getShortestSubtagLength(localeID) == 1) /* Converts the BCP47 id to Unicode id. Does nothing to id if conversion fails */ #define _ConvertBCP47(finalID, id, buffer, length,err) \ - if (uloc_forLanguageTag(id, buffer, length, NULL, err) <= 0 || U_FAILURE(*err)) { \ + if (uloc_forLanguageTag(id, buffer, length, NULL, err) <= 0 || \ + U_FAILURE(*err) || *err == U_STRING_NOT_TERMINATED_WARNING) { \ finalID=id; \ + if (*err == U_STRING_NOT_TERMINATED_WARNING) { *err = U_BUFFER_OVERFLOW_ERROR; } \ } else { \ finalID=buffer; \ } /* Gets the size of the shortest subtag in the given localeID. */ static int32_t getShortestSubtagLength(const char *localeID) { - int32_t localeIDLength = uprv_strlen(localeID); + int32_t localeIDLength = static_cast<int32_t>(uprv_strlen(localeID)); int32_t length = localeIDLength; int32_t tmpLength = 0; int32_t i; @@ -2486,7 +2490,7 @@ uloc_acceptLanguage(char *result, int32_t resultAvailable, #if defined(ULOC_DEBUG) fprintf(stderr,"%02d: %s\n", i, acceptList[i]); #endif - while((l=uenum_next(availableLocales, NULL, status))) { + while((l=uenum_next(availableLocales, NULL, status)) != NULL) { #if defined(ULOC_DEBUG) fprintf(stderr," %s\n", l); #endif @@ -2526,7 +2530,7 @@ uloc_acceptLanguage(char *result, int32_t resultAvailable, #if defined(ULOC_DEBUG) fprintf(stderr,"Try: [%s]", fallbackList[i]); #endif - while((l=uenum_next(availableLocales, NULL, status))) { + while((l=uenum_next(availableLocales, NULL, status)) != NULL) { #if defined(ULOC_DEBUG) fprintf(stderr," %s\n", l); #endif |