From ebd8b4493cd6f7a656c5362ed7867d9847261ed1 Mon Sep 17 00:00:00 2001 From: nodejs-github-bot <18269663+nodejs-github-bot@users.noreply.github.com> Date: Sun, 2 Nov 2025 00:38:33 +0000 Subject: [PATCH 1/2] deps: update icu to 78.1 --- deps/icu-small/LICENSE | 26 + deps/icu-small/README-FULL-ICU.txt | 4 +- deps/icu-small/source/common/BUILD.bazel | 1 + deps/icu-small/source/common/brkiter.cpp | 47 +- deps/icu-small/source/common/charstr.h | 86 +- deps/icu-small/source/common/cmemory.h | 4 - deps/icu-small/source/common/cstr.h | 8 +- deps/icu-small/source/common/fixedstring.cpp | 29 + deps/icu-small/source/common/fixedstring.h | 104 + .../icu-small/source/common/localebuilder.cpp | 10 +- .../source/common/localefallback_data.h | 2673 +++--- deps/icu-small/source/common/locbased.cpp | 73 +- deps/icu-small/source/common/locbased.h | 61 +- deps/icu-small/source/common/locdispnames.cpp | 20 +- deps/icu-small/source/common/locid.cpp | 654 +- deps/icu-small/source/common/loclikely.cpp | 2 +- .../source/common/loclikelysubtags.cpp | 33 +- deps/icu-small/source/common/lstmbe.cpp | 10 +- deps/icu-small/source/common/norm2_nfc_data.h | 87 +- .../icu-small/source/common/normalizer2impl.h | 204 +- deps/icu-small/source/common/propname_data.h | 1731 ++-- deps/icu-small/source/common/rbbidata.h | 2 +- deps/icu-small/source/common/rbbiscan.cpp | 2 +- deps/icu-small/source/common/rbbisetb.cpp | 7 +- deps/icu-small/source/common/rbbisetb.h | 2 +- deps/icu-small/source/common/rbbitblb.cpp | 2 +- deps/icu-small/source/common/servloc.h | 32 +- deps/icu-small/source/common/sharedobject.h | 20 +- .../source/common/static_unicode_sets.cpp | 6 + .../source/common/static_unicode_sets.h | 1 + .../source/common/ubidi_props_data.h | 855 +- .../source/common/ucase_props_data.h | 325 +- deps/icu-small/source/common/ucasemap.cpp | 6 +- deps/icu-small/source/common/uchar.cpp | 27 + .../source/common/uchar_props_data.h | 7417 +++++++++-------- deps/icu-small/source/common/ucnv.cpp | 28 +- deps/icu-small/source/common/ucnv2022.cpp | 2 +- deps/icu-small/source/common/ucnv_io.cpp | 41 +- deps/icu-small/source/common/udata.cpp | 1 + deps/icu-small/source/common/uidna.cpp | 115 +- deps/icu-small/source/common/uloc.cpp | 18 +- deps/icu-small/source/common/uloc_keytype.cpp | 44 +- deps/icu-small/source/common/ulocimp.h | 78 +- deps/icu-small/source/common/umapfile.cpp | 7 + deps/icu-small/source/common/umutex.h | 64 +- .../icu-small/source/common/unicode/brkiter.h | 113 +- .../source/common/unicode/bytestream.h | 35 +- .../source/common/unicode/bytestriebuilder.h | 3 - .../icu-small/source/common/unicode/caniter.h | 2 - .../icu-small/source/common/unicode/docmain.h | 6 +- .../source/common/unicode/localebuilder.h | 4 +- .../source/common/unicode/localpointer.h | 2 - deps/icu-small/source/common/unicode/locid.h | 384 +- .../source/common/unicode/platform.h | 25 +- deps/icu-small/source/common/unicode/rbbi.h | 13 - .../source/common/unicode/stringpiece.h | 2 +- deps/icu-small/source/common/unicode/uchar.h | 51 +- .../source/common/unicode/umachine.h | 22 + deps/icu-small/source/common/unicode/uniset.h | 52 +- deps/icu-small/source/common/unicode/unistr.h | 119 +- .../icu-small/source/common/unicode/uobject.h | 3 +- .../icu-small/source/common/unicode/urename.h | 8 +- .../icu-small/source/common/unicode/uscript.h | 13 +- deps/icu-small/source/common/unicode/uset.h | 117 +- deps/icu-small/source/common/unicode/utf.h | 33 +- deps/icu-small/source/common/unicode/utf8.h | 32 +- .../icu-small/source/common/unicode/utf_old.h | 2 + .../source/common/unicode/utfiterator.h | 2677 ++++++ .../source/common/unicode/utfstring.h | 161 + deps/icu-small/source/common/unicode/utypes.h | 79 + .../icu-small/source/common/unicode/uvernum.h | 10 +- .../source/common/unicode/uversion.h | 8 +- deps/icu-small/source/common/uniset.cpp | 6 +- deps/icu-small/source/common/unistr_cnv.cpp | 25 +- deps/icu-small/source/common/uposixdefs.h | 5 + deps/icu-small/source/common/uprops.h | 6 +- deps/icu-small/source/common/uresimp.h | 2 - .../icu-small/source/common/uscript_props.cpp | 10 +- deps/icu-small/source/common/usprep.cpp | 16 +- deps/icu-small/source/common/ustr_wcs.cpp | 32 +- deps/icu-small/source/common/uts46.cpp | 12 +- .../in/{icudt77l.dat.bz2 => icudt78l.dat.bz2} | Bin 11111695 -> 11344552 bytes deps/icu-small/source/i18n/basictz.cpp | 39 +- deps/icu-small/source/i18n/calendar.cpp | 68 +- deps/icu-small/source/i18n/cecal.cpp | 26 +- deps/icu-small/source/i18n/cecal.h | 23 +- deps/icu-small/source/i18n/chnsecal.cpp | 114 +- deps/icu-small/source/i18n/chnsecal.h | 15 - deps/icu-small/source/i18n/collationbuilder.h | 2 +- .../source/i18n/collationdatabuilder.cpp | 92 +- .../source/i18n/collationdatabuilder.h | 6 + .../source/i18n/collationdatawriter.cpp | 14 +- deps/icu-small/source/i18n/collationfcd.cpp | 38 +- .../icu-small/source/i18n/collationiterator.h | 22 +- .../source/i18n/collationtailoring.h | 25 +- deps/icu-small/source/i18n/collunsafe.h | 238 +- deps/icu-small/source/i18n/coptccal.cpp | 53 +- deps/icu-small/source/i18n/coptccal.h | 56 +- deps/icu-small/source/i18n/csrecog.h | 2 +- deps/icu-small/source/i18n/dangical.cpp | 29 +- deps/icu-small/source/i18n/dangical.h | 18 - deps/icu-small/source/i18n/dcfmtsym.cpp | 32 +- deps/icu-small/source/i18n/dtfmtsym.cpp | 182 +- deps/icu-small/source/i18n/dtptngen.cpp | 29 +- deps/icu-small/source/i18n/erarules.cpp | 184 +- deps/icu-small/source/i18n/erarules.h | 52 +- deps/icu-small/source/i18n/ethpccal.cpp | 102 +- deps/icu-small/source/i18n/ethpccal.h | 68 +- deps/icu-small/source/i18n/fmtable.cpp | 37 +- deps/icu-small/source/i18n/format.cpp | 17 +- .../icu-small/source/i18n/formattedval_impl.h | 25 +- deps/icu-small/source/i18n/fphdlimp.h | 2 - deps/icu-small/source/i18n/gregocal.cpp | 16 +- deps/icu-small/source/i18n/gregoimp.cpp | 15 +- deps/icu-small/source/i18n/gregoimp.h | 26 - deps/icu-small/source/i18n/hebrwcal.cpp | 27 +- deps/icu-small/source/i18n/hebrwcal.h | 16 +- deps/icu-small/source/i18n/indiancal.cpp | 31 +- deps/icu-small/source/i18n/indiancal.h | 19 +- deps/icu-small/source/i18n/japancal.cpp | 12 +- deps/icu-small/source/i18n/measunit.cpp | 1036 ++- deps/icu-small/source/i18n/measunit_extra.cpp | 197 +- deps/icu-small/source/i18n/measunit_impl.h | 56 +- deps/icu-small/source/i18n/messageformat2.cpp | 105 +- .../source/i18n/messageformat2_arguments.cpp | 6 +- .../source/i18n/messageformat2_checker.cpp | 3 +- .../source/i18n/messageformat2_data_model.cpp | 10 +- .../source/i18n/messageformat2_errors.cpp | 22 + .../source/i18n/messageformat2_errors.h | 15 + .../source/i18n/messageformat2_evaluation.cpp | 108 +- .../source/i18n/messageformat2_evaluation.h | 17 +- .../i18n/messageformat2_formattable.cpp | 20 +- .../source/i18n/messageformat2_formatter.cpp | 45 +- .../i18n/messageformat2_function_registry.cpp | 615 +- ...essageformat2_function_registry_internal.h | 71 +- .../source/i18n/messageformat2_parser.cpp | 164 +- .../source/i18n/messageformat2_parser.h | 1 + deps/icu-small/source/i18n/nfrs.cpp | 11 +- deps/icu-small/source/i18n/nfrule.cpp | 19 + deps/icu-small/source/i18n/nfsubs.cpp | 17 +- deps/icu-small/source/i18n/number_asformat.h | 34 +- .../source/i18n/number_currencysymbols.h | 10 +- deps/icu-small/source/i18n/number_decnum.h | 13 +- .../source/i18n/number_longnames.cpp | 5 +- .../source/i18n/number_patternmodifier.h | 45 +- .../icu-small/source/i18n/number_usageprefs.h | 19 +- .../source/i18n/numparse_affixes.cpp | 8 + deps/icu-small/source/i18n/numparse_affixes.h | 39 +- .../source/i18n/numparse_compositions.h | 17 +- .../icu-small/source/i18n/numparse_currency.h | 4 +- .../source/i18n/numparse_decimal.cpp | 28 +- deps/icu-small/source/i18n/numparse_decimal.h | 1 + deps/icu-small/source/i18n/numparse_impl.cpp | 2 + deps/icu-small/source/i18n/numparse_impl.h | 23 +- .../source/i18n/numparse_symbols.cpp | 17 + deps/icu-small/source/i18n/numparse_symbols.h | 17 + .../source/i18n/numparse_validators.cpp | 3 +- deps/icu-small/source/i18n/numrange_impl.cpp | 10 +- deps/icu-small/source/i18n/numrange_impl.h | 1 + deps/icu-small/source/i18n/olsontz.h | 6 +- deps/icu-small/source/i18n/persncal.cpp | 26 +- deps/icu-small/source/i18n/persncal.h | 12 +- deps/icu-small/source/i18n/rbnf.cpp | 10 + deps/icu-small/source/i18n/rbt_pars.cpp | 88 +- deps/icu-small/source/i18n/rbt_rule.cpp | 2 +- deps/icu-small/source/i18n/rbt_rule.h | 2 +- deps/icu-small/source/i18n/regexcmp.cpp | 2 +- deps/icu-small/source/i18n/regexcmp.h | 6 +- deps/icu-small/source/i18n/regexcst.h | 292 +- deps/icu-small/source/i18n/regexcst.pl | 28 +- deps/icu-small/source/i18n/regeximp.h | 4 +- deps/icu-small/source/i18n/reldtfmt.h | 4 +- deps/icu-small/source/i18n/rematch.cpp | 24 +- deps/icu-small/source/i18n/scriptset.cpp | 4 +- .../source/i18n/shareddateformatsymbols.h | 11 +- deps/icu-small/source/i18n/smpdtfmt.cpp | 21 +- deps/icu-small/source/i18n/tzfmt.cpp | 5 - deps/icu-small/source/i18n/tzgnames.cpp | 28 +- deps/icu-small/source/i18n/tznames.cpp | 22 +- deps/icu-small/source/i18n/tznames_impl.cpp | 23 +- deps/icu-small/source/i18n/tznames_impl.h | 4 +- deps/icu-small/source/i18n/ucln_in.h | 1 + deps/icu-small/source/i18n/udat.cpp | 38 + .../source/i18n/unicode/alphaindex.h | 4 - deps/icu-small/source/i18n/unicode/calendar.h | 337 +- deps/icu-small/source/i18n/unicode/coll.h | 18 +- deps/icu-small/source/i18n/unicode/datefmt.h | 180 +- deps/icu-small/source/i18n/unicode/dcfmtsym.h | 86 +- deps/icu-small/source/i18n/unicode/decimfmt.h | 4 +- deps/icu-small/source/i18n/unicode/dtfmtsym.h | 187 +- deps/icu-small/source/i18n/unicode/dtitvfmt.h | 158 +- deps/icu-small/source/i18n/unicode/dtitvinf.h | 7 +- deps/icu-small/source/i18n/unicode/dtptngen.h | 146 +- deps/icu-small/source/i18n/unicode/fmtable.h | 12 +- deps/icu-small/source/i18n/unicode/format.h | 71 +- .../source/i18n/unicode/formattednumber.h | 1 - deps/icu-small/source/i18n/unicode/gregocal.h | 7 - deps/icu-small/source/i18n/unicode/measunit.h | 898 +- .../source/i18n/unicode/messageformat2.h | 65 +- .../i18n/unicode/messageformat2_arguments.h | 27 +- .../i18n/unicode/messageformat2_data_model.h | 387 +- .../i18n/unicode/messageformat2_formattable.h | 205 +- deps/icu-small/source/i18n/unicode/msgfmt.h | 151 +- .../source/i18n/unicode/numberformatter.h | 8 +- .../i18n/unicode/numberrangeformatter.h | 42 +- deps/icu-small/source/i18n/unicode/plurfmt.h | 195 +- deps/icu-small/source/i18n/unicode/rbnf.h | 201 +- deps/icu-small/source/i18n/unicode/regex.h | 154 +- .../source/i18n/unicode/reldatefmt.h | 40 +- deps/icu-small/source/i18n/unicode/smpdtfmt.h | 119 +- deps/icu-small/source/i18n/unicode/tblcoll.h | 223 +- deps/icu-small/source/i18n/unicode/tmunit.h | 1 - deps/icu-small/source/i18n/unicode/tzfmt.h | 108 +- deps/icu-small/source/i18n/unicode/ucal.h | 2 +- deps/icu-small/source/i18n/unicode/ucol.h | 22 +- deps/icu-small/source/i18n/unicode/udat.h | 16 +- deps/icu-small/source/i18n/unicode/udatpg.h | 2 +- deps/icu-small/source/i18n/unicode/ulocdata.h | 2 +- .../source/i18n/units_complexconverter.h | 33 +- .../icu-small/source/i18n/units_converter.cpp | 69 +- deps/icu-small/source/i18n/units_converter.h | 34 +- deps/icu-small/source/i18n/units_data.cpp | 57 +- deps/icu-small/source/i18n/units_data.h | 86 +- deps/icu-small/source/i18n/units_router.h | 29 +- deps/icu-small/source/i18n/usearch.cpp | 138 +- deps/icu-small/source/i18n/uspoof_conf.cpp | 9 +- deps/icu-small/source/tools/genrb/genrb.cpp | 2 +- deps/icu-small/source/tools/genrb/parse.cpp | 19 +- deps/icu-small/source/tools/genrb/read.c | 2 + deps/icu-small/source/tools/genrb/wrtjava.cpp | 3 +- .../tools/icuexportdata/icuexportdata.cpp | 116 +- .../source/tools/pkgdata/pkgdata.cpp | 6 +- .../icu-small/source/tools/pkgdata/pkgtypes.h | 1 + .../source/tools/toolutil/json-json.hpp | 12 +- .../source/tools/toolutil/pkg_genc.cpp | 14 +- .../source/tools/toolutil/pkg_gencmn.cpp | 2 +- .../source/tools/toolutil/udbgutil.cpp | 7 + .../source/tools/toolutil/writesrc.cpp | 10 +- tools/icu/current_ver.dep | 4 +- 239 files changed, 17667 insertions(+), 11400 deletions(-) create mode 100644 deps/icu-small/source/common/fixedstring.cpp create mode 100644 deps/icu-small/source/common/fixedstring.h create mode 100644 deps/icu-small/source/common/unicode/utfiterator.h create mode 100644 deps/icu-small/source/common/unicode/utfstring.h rename deps/icu-small/source/data/in/{icudt77l.dat.bz2 => icudt78l.dat.bz2} (57%) diff --git a/deps/icu-small/LICENSE b/deps/icu-small/LICENSE index 0b9efcd9092f97..5a2eda629500c3 100644 --- a/deps/icu-small/LICENSE +++ b/deps/icu-small/LICENSE @@ -540,3 +540,29 @@ publicity pertaining to distribution of the software without specific, written prior permission. M.I.T. makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. + +---------------------------------------------------------------------- + +File: sorttable.js (only for ICU4J) + +The MIT Licence, for code from kryogenix.org + +Code downloaded from the Browser Experiments section of kryogenix.org is +licenced under the so-called MIT licence. The licence is below. + +Copyright (c) 1997-date Stuart Langridge + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/deps/icu-small/README-FULL-ICU.txt b/deps/icu-small/README-FULL-ICU.txt index ee3fdf50b5e59e..882e0f28b6240e 100644 --- a/deps/icu-small/README-FULL-ICU.txt +++ b/deps/icu-small/README-FULL-ICU.txt @@ -1,8 +1,8 @@ ICU sources - auto generated by shrink-icu-src.py This directory contains the ICU subset used by --with-intl=full-icu -It is a strict subset of ICU 77 source files with the following exception(s): -* deps/icu-small/source/data/in/icudt77l.dat.bz2 : compressed data file +It is a strict subset of ICU 78 source files with the following exception(s): +* deps/icu-small/source/data/in/icudt78l.dat.bz2 : compressed data file To rebuild this directory, see ../../tools/icu/README.md diff --git a/deps/icu-small/source/common/BUILD.bazel b/deps/icu-small/source/common/BUILD.bazel index 3ecae30c437f08..e894ed907e6e61 100644 --- a/deps/icu-small/source/common/BUILD.bazel +++ b/deps/icu-small/source/common/BUILD.bazel @@ -64,6 +64,7 @@ cc_library( "umutex.cpp", "sharedobject.cpp", "utrace.cpp", + "fixedstring.cpp", ], deps = [ ":headers", diff --git a/deps/icu-small/source/common/brkiter.cpp b/deps/icu-small/source/common/brkiter.cpp index 44a13ee6a2acd1..09d168bbf46fe3 100644 --- a/deps/icu-small/source/common/brkiter.cpp +++ b/deps/icu-small/source/common/brkiter.cpp @@ -121,11 +121,9 @@ BreakIterator::buildInstance(const Locale& loc, const char *type, UErrorCode &st // If there is a result, set the valid locale and actual locale, and the kind if (U_SUCCESS(status) && result != nullptr) { - U_LOCALE_BASED(locBased, *(BreakIterator*)result); - - locBased.setLocaleIDs(ures_getLocaleByType(b, ULOC_VALID_LOCALE, &status), - actual.data(), status); - LocaleBased::setLocaleID(loc.getName(), result->requestLocale, status); + result->actualLocale = Locale(actual.data()); + result->validLocale = Locale(ures_getLocaleByType(b, ULOC_VALID_LOCALE, &status)); + result->requestLocale = loc; } ures_close(b); @@ -204,33 +202,28 @@ BreakIterator::getAvailableLocales(int32_t& count) //------------------------------------------- BreakIterator::BreakIterator() + : actualLocale(Locale::getRoot()), validLocale(Locale::getRoot()), requestLocale(Locale::getRoot()) { } -BreakIterator::BreakIterator(const BreakIterator &other) : UObject(other) { - UErrorCode status = U_ZERO_ERROR; - U_LOCALE_BASED(locBased, *this); - locBased.setLocaleIDs(other.validLocale, other.actualLocale, status); - LocaleBased::setLocaleID(other.requestLocale, requestLocale, status); - U_ASSERT(U_SUCCESS(status)); +BreakIterator::BreakIterator(const BreakIterator &other) + : UObject(other), + actualLocale(other.actualLocale), + validLocale(other.validLocale), + requestLocale(other.requestLocale) { } BreakIterator &BreakIterator::operator =(const BreakIterator &other) { if (this != &other) { - UErrorCode status = U_ZERO_ERROR; - U_LOCALE_BASED(locBased, *this); - locBased.setLocaleIDs(other.validLocale, other.actualLocale, status); - LocaleBased::setLocaleID(other.requestLocale, requestLocale, status); - U_ASSERT(U_SUCCESS(status)); + actualLocale = other.actualLocale; + validLocale = other.validLocale; + requestLocale = other.requestLocale; } return *this; } BreakIterator::~BreakIterator() { - delete validLocale; - delete actualLocale; - delete requestLocale; } // ------------------------------------------ @@ -398,8 +391,8 @@ BreakIterator::createInstance(const Locale& loc, int32_t kind, UErrorCode& statu // THIS LONG is a sign of bad code -- so the action item is to // revisit this in ICU 3.0 and clean it up/fix it/remove it. if (U_SUCCESS(status) && (result != nullptr) && *actualLoc.getName() != 0) { - U_LOCALE_BASED(locBased, *result); - locBased.setLocaleIDs(actualLoc.getName(), actualLoc.getName(), status); + result->actualLocale = actualLoc; + result->validLocale = actualLoc; } return result; } @@ -506,8 +499,7 @@ BreakIterator::getLocale(ULocDataLocaleType type, UErrorCode& status) const { return Locale::getRoot(); } if (type == ULOC_REQUESTED_LOCALE) { - return requestLocale == nullptr ? - Locale::getRoot() : Locale(requestLocale->data()); + return requestLocale; } return LocaleBased::getLocale(validLocale, actualLocale, type, status); } @@ -518,7 +510,7 @@ BreakIterator::getLocaleID(ULocDataLocaleType type, UErrorCode& status) const { return nullptr; } if (type == ULOC_REQUESTED_LOCALE) { - return requestLocale == nullptr ? "" : requestLocale->data(); + return requestLocale.getName(); } return LocaleBased::getLocaleID(validLocale, actualLocale, type, status); } @@ -546,11 +538,8 @@ int32_t BreakIterator::getRuleStatusVec(int32_t *fillInVec, int32_t capacity, UE return 1; } -BreakIterator::BreakIterator (const Locale& valid, const Locale& actual) { - UErrorCode status = U_ZERO_ERROR; - U_LOCALE_BASED(locBased, (*this)); - locBased.setLocaleIDs(valid.getName(), actual.getName(), status); - U_ASSERT(U_SUCCESS(status)); +BreakIterator::BreakIterator(const Locale& valid, const Locale& actual) + : actualLocale(actual), validLocale(valid), requestLocale(Locale::getRoot()) { } U_NAMESPACE_END diff --git a/deps/icu-small/source/common/charstr.h b/deps/icu-small/source/common/charstr.h index ea54ede735cd3d..a4a70f0773b2f9 100644 --- a/deps/icu-small/source/common/charstr.h +++ b/deps/icu-small/source/common/charstr.h @@ -21,12 +21,6 @@ U_NAMESPACE_BEGIN -// Windows needs us to DLL-export the MaybeStackArray template specialization, -// but MacOS X cannot handle it. Same as in digitlst.h. -#if !U_PLATFORM_IS_DARWIN_BASED -template class U_COMMON_API MaybeStackArray; -#endif - /** * ICU-internal char * string class. * This class does not assume or enforce any particular character encoding. @@ -38,34 +32,34 @@ template class U_COMMON_API MaybeStackArray; * For example: * cs.data()[5]='a'; // no need for setCharAt(5, 'a') */ -class U_COMMON_API CharString : public UMemory { +class U_COMMON_API_CLASS CharString : public UMemory { public: - CharString() : len(0) { buffer[0]=0; } - CharString(StringPiece s, UErrorCode &errorCode) : len(0) { + U_COMMON_API CharString() : len(0) { buffer[0]=0; } + U_COMMON_API CharString(StringPiece s, UErrorCode &errorCode) : len(0) { buffer[0]=0; append(s, errorCode); } - CharString(const CharString &s, UErrorCode &errorCode) : len(0) { + U_COMMON_API CharString(const CharString &s, UErrorCode &errorCode) : len(0) { buffer[0]=0; append(s, errorCode); } - CharString(const char *s, int32_t sLength, UErrorCode &errorCode) : len(0) { + U_COMMON_API CharString(const char *s, int32_t sLength, UErrorCode &errorCode) : len(0) { buffer[0]=0; append(s, sLength, errorCode); } - ~CharString() {} + U_COMMON_API ~CharString() {} /** * Move constructor; might leave src in an undefined state. * This string will have the same contents and state that the source string had. */ - CharString(CharString &&src) noexcept; + U_COMMON_API CharString(CharString &&src) noexcept; /** * Move assignment operator; might leave src in an undefined state. * This string will have the same contents and state that the source string had. * The behavior is undefined if *this and src are the same object. */ - CharString &operator=(CharString &&src) noexcept; + U_COMMON_API CharString &operator=(CharString &&src) noexcept; /** * Replaces this string's contents with the other string's contents. @@ -73,21 +67,21 @@ class U_COMMON_API CharString : public UMemory { * the assignment operator, to make copies explicit and to * use a UErrorCode where memory allocations might be needed. */ - CharString ©From(const CharString &other, UErrorCode &errorCode); - CharString ©From(StringPiece s, UErrorCode &errorCode); + U_COMMON_API CharString ©From(const CharString &other, UErrorCode &errorCode); + U_COMMON_API CharString ©From(StringPiece s, UErrorCode &errorCode); - UBool isEmpty() const { return len==0; } - int32_t length() const { return len; } - char operator[](int32_t index) const { return buffer[index]; } - StringPiece toStringPiece() const { return StringPiece(buffer.getAlias(), len); } + U_COMMON_API UBool isEmpty() const { return len==0; } + U_COMMON_API int32_t length() const { return len; } + U_COMMON_API char operator[](int32_t index) const { return buffer[index]; } + U_COMMON_API StringPiece toStringPiece() const { return StringPiece(buffer.getAlias(), len); } - const char *data() const { return buffer.getAlias(); } - char *data() { return buffer.getAlias(); } + U_COMMON_API const char *data() const { return buffer.getAlias(); } + U_COMMON_API char *data() { return buffer.getAlias(); } /** * Allocates length()+1 chars and copies the NUL-terminated data(). * The caller must uprv_free() the result. */ - char *cloneData(UErrorCode &errorCode) const; + U_COMMON_API char *cloneData(UErrorCode &errorCode) const; /** * Copies the contents of the string into dest. * Checks if there is enough space in dest, extracts the entire string if possible, @@ -103,40 +97,40 @@ class U_COMMON_API CharString : public UMemory { * @param errorCode ICU error code. * @return length() */ - int32_t extract(char *dest, int32_t capacity, UErrorCode &errorCode) const; + U_COMMON_API int32_t extract(char *dest, int32_t capacity, UErrorCode &errorCode) const; - bool operator==(const CharString& other) const { + U_COMMON_API bool operator==(const CharString& other) const { return len == other.length() && (len == 0 || uprv_memcmp(data(), other.data(), len) == 0); } - bool operator!=(const CharString& other) const { + U_COMMON_API bool operator!=(const CharString& other) const { return !operator==(other); } - bool operator==(StringPiece other) const { + U_COMMON_API bool operator==(StringPiece other) const { return len == other.length() && (len == 0 || uprv_memcmp(data(), other.data(), len) == 0); } - bool operator!=(StringPiece other) const { + U_COMMON_API bool operator!=(StringPiece other) const { return !operator==(other); } /** @return last index of c, or -1 if c is not in this string */ - int32_t lastIndexOf(char c) const; + U_COMMON_API int32_t lastIndexOf(char c) const; - bool contains(StringPiece s) const; + U_COMMON_API bool contains(StringPiece s) const; - CharString &clear() { len=0; buffer[0]=0; return *this; } - CharString &truncate(int32_t newLength); + U_COMMON_API CharString &clear() { len=0; buffer[0]=0; return *this; } + U_COMMON_API CharString &truncate(int32_t newLength); - CharString &append(char c, UErrorCode &errorCode); - CharString &append(StringPiece s, UErrorCode &errorCode) { + U_COMMON_API CharString &append(char c, UErrorCode &errorCode); + U_COMMON_API CharString &append(StringPiece s, UErrorCode &errorCode) { return append(s.data(), s.length(), errorCode); } - CharString &append(const CharString &s, UErrorCode &errorCode) { + U_COMMON_API CharString &append(const CharString &s, UErrorCode &errorCode) { return append(s.data(), s.length(), errorCode); } - CharString &append(const char *s, int32_t sLength, UErrorCode &status); + U_COMMON_API CharString &append(const char *s, int32_t sLength, UErrorCode &status); - CharString &appendNumber(int64_t number, UErrorCode &status); + U_COMMON_API CharString &appendNumber(int64_t number, UErrorCode &status); /** * Returns a writable buffer for appending and writes the buffer's capacity to @@ -158,26 +152,28 @@ class U_COMMON_API CharString : public UMemory { * @param errorCode in/out error code * @return a buffer with resultCapacity>=min_capacity */ - char *getAppendBuffer(int32_t minCapacity, - int32_t desiredCapacityHint, - int32_t &resultCapacity, - UErrorCode &errorCode); + U_COMMON_API char *getAppendBuffer(int32_t minCapacity, + int32_t desiredCapacityHint, + int32_t &resultCapacity, + UErrorCode &errorCode); - CharString &appendInvariantChars(const UnicodeString &s, UErrorCode &errorCode); - CharString &appendInvariantChars(const char16_t* uchars, int32_t ucharsLen, UErrorCode& errorCode); + U_COMMON_API CharString &appendInvariantChars(const UnicodeString &s, UErrorCode &errorCode); + U_COMMON_API CharString &appendInvariantChars(const char16_t* uchars, + int32_t ucharsLen, + UErrorCode& errorCode); /** * Appends a filename/path part, e.g., a directory name. * First appends a U_FILE_SEP_CHAR or U_FILE_ALT_SEP_CHAR if necessary. * Does nothing if s is empty. */ - CharString &appendPathPart(StringPiece s, UErrorCode &errorCode); + U_COMMON_API CharString &appendPathPart(StringPiece s, UErrorCode &errorCode); /** * Appends a U_FILE_SEP_CHAR or U_FILE_ALT_SEP_CHAR if this string is not empty * and does not already end with a U_FILE_SEP_CHAR or U_FILE_ALT_SEP_CHAR. */ - CharString &ensureEndsWithFileSeparator(UErrorCode &errorCode); + U_COMMON_API CharString &ensureEndsWithFileSeparator(UErrorCode &errorCode); private: MaybeStackArray buffer; diff --git a/deps/icu-small/source/common/cmemory.h b/deps/icu-small/source/common/cmemory.h index 3705c2dfd0e069..e31c54aac7099c 100644 --- a/deps/icu-small/source/common/cmemory.h +++ b/deps/icu-small/source/common/cmemory.h @@ -334,9 +334,7 @@ class MaybeStackArray { // No heap allocation. Use only on the stack. static void* U_EXPORT2 operator new(size_t) noexcept = delete; static void* U_EXPORT2 operator new[](size_t) noexcept = delete; -#if U_HAVE_PLACEMENT_NEW static void* U_EXPORT2 operator new(size_t, void*) noexcept = delete; -#endif /** * Default constructor initializes with internal T[stackCapacity] buffer. @@ -570,9 +568,7 @@ class MaybeStackHeaderAndArray { // No heap allocation. Use only on the stack. static void* U_EXPORT2 operator new(size_t) noexcept = delete; static void* U_EXPORT2 operator new[](size_t) noexcept = delete; -#if U_HAVE_PLACEMENT_NEW static void* U_EXPORT2 operator new(size_t, void*) noexcept = delete; -#endif /** * Default constructor initializes with internal H+T[stackCapacity] buffer. diff --git a/deps/icu-small/source/common/cstr.h b/deps/icu-small/source/common/cstr.h index be21d910bb475e..84a07543eabac5 100644 --- a/deps/icu-small/source/common/cstr.h +++ b/deps/icu-small/source/common/cstr.h @@ -43,11 +43,11 @@ U_NAMESPACE_BEGIN -class U_COMMON_API CStr : public UMemory { +class U_COMMON_API_CLASS CStr : public UMemory { public: - CStr(const UnicodeString &in); - ~CStr(); - const char * operator ()() const; + U_COMMON_API CStr(const UnicodeString &in); + U_COMMON_API ~CStr(); + U_COMMON_API const char * operator ()() const; private: CharString s; diff --git a/deps/icu-small/source/common/fixedstring.cpp b/deps/icu-small/source/common/fixedstring.cpp new file mode 100644 index 00000000000000..1c603083e2f2b2 --- /dev/null +++ b/deps/icu-small/source/common/fixedstring.cpp @@ -0,0 +1,29 @@ +// © 2025 and later: Unicode, Inc. and others. +// License & terms of use: https://www.unicode.org/copyright.html + +#include "fixedstring.h" + +#include "unicode/unistr.h" +#include "unicode/utypes.h" + +U_NAMESPACE_BEGIN + +U_EXPORT void copyInvariantChars(const UnicodeString& src, FixedString& dst, UErrorCode& status) { + if (U_FAILURE(status)) { + return; + } + + if (src.isEmpty()) { + dst.clear(); + return; + } + + int32_t length = src.length(); + if (!dst.reserve(length + 1)) { + status = U_MEMORY_ALLOCATION_ERROR; + return; + } + src.extract(0, length, dst.getAlias(), length + 1, US_INV); +} + +U_NAMESPACE_END diff --git a/deps/icu-small/source/common/fixedstring.h b/deps/icu-small/source/common/fixedstring.h new file mode 100644 index 00000000000000..b576d17ad9af83 --- /dev/null +++ b/deps/icu-small/source/common/fixedstring.h @@ -0,0 +1,104 @@ +// © 2025 and later: Unicode, Inc. and others. +// License & terms of use: https://www.unicode.org/copyright.html + +#ifndef FIXEDSTRING_H +#define FIXEDSTRING_H + +#include +#include + +#include "unicode/uobject.h" +#include "unicode/utypes.h" +#include "cmemory.h" + +U_NAMESPACE_BEGIN + +class UnicodeString; + +/** + * ICU-internal fixed-length char* string class. + * This is a complement to CharString to store fixed-length strings efficiently + * (not allocating any unnecessary storage for future additions to the string). + * + * A terminating NUL is always stored, but the length of the string isn't. + * An empty string is stored as nullptr, allocating no storage at all. + * + * This class wants to be convenient but is also deliberately minimalist. + * Please do not add methods if they only add minor convenience. + */ +class FixedString : public UMemory { +public: + FixedString() = default; + ~FixedString() { operator delete[](ptr); } + + FixedString(const FixedString& other) : FixedString(other.data()) {} + + FixedString(std::string_view init) { + size_t size = init.size(); + if (size > 0 && reserve(size + 1)) { + uprv_memcpy(ptr, init.data(), size); + ptr[size] = '\0'; + } + } + + FixedString& operator=(const FixedString& other) { + *this = other.data(); + return *this; + } + + FixedString& operator=(std::string_view init) { + if (init.empty()) { + operator delete[](ptr); + ptr = nullptr; + } else { + size_t size = init.size(); + if (reserve(size + 1)) { + uprv_memcpy(ptr, init.data(), size); + ptr[size] = '\0'; + } + } + return *this; + } + + FixedString(FixedString&& other) noexcept : ptr(std::exchange(other.ptr, nullptr)) {} + + FixedString& operator=(FixedString&& other) noexcept { + operator delete[](ptr); + ptr = other.ptr; + other.ptr = nullptr; + return *this; + } + + void clear() { + operator delete[](ptr); + ptr = nullptr; + } + + const char* data() const { + return isEmpty() ? "" : ptr; + } + + char* getAlias() { + return ptr; + } + + bool isEmpty() const { + return ptr == nullptr; + } + + /** Allocate storage for a new string, without initializing it. */ + bool reserve(size_t size) { + operator delete[](ptr); + ptr = static_cast(operator new[](size)); + return ptr != nullptr; + } + +private: + char* ptr = nullptr; +}; + +U_COMMON_API void copyInvariantChars(const UnicodeString& src, FixedString& dst, UErrorCode& status); + +U_NAMESPACE_END + +#endif diff --git a/deps/icu-small/source/common/localebuilder.cpp b/deps/icu-small/source/common/localebuilder.cpp index 71969c847b19c1..3ba7355306894c 100644 --- a/deps/icu-small/source/common/localebuilder.cpp +++ b/deps/icu-small/source/common/localebuilder.cpp @@ -8,6 +8,7 @@ #include "bytesinkutil.h" // StringByteSink #include "charstr.h" #include "cstring.h" +#include "fixedstring.h" #include "ulocimp.h" #include "unicode/localebuilder.h" #include "unicode/locid.h" @@ -131,14 +132,13 @@ LocaleBuilder& LocaleBuilder::setVariant(StringPiece variant) variant_ = nullptr; return *this; } - CharString* new_variant = new CharString(variant, status_); - if (U_FAILURE(status_)) { return *this; } - if (new_variant == nullptr) { + FixedString* new_variant = new FixedString(variant); + if (new_variant == nullptr || new_variant->isEmpty()) { status_ = U_MEMORY_ALLOCATION_ERROR; return *this; } - transform(new_variant->data(), new_variant->length()); - if (!ultag_isVariantSubtags(new_variant->data(), new_variant->length())) { + transform(new_variant->getAlias(), variant.length()); + if (!ultag_isVariantSubtags(new_variant->data(), variant.length())) { delete new_variant; status_ = U_ILLEGAL_ARGUMENT_ERROR; return *this; diff --git a/deps/icu-small/source/common/localefallback_data.h b/deps/icu-small/source/common/localefallback_data.h index 3b8ad8a3f398b8..338bfa3595ba42 100644 --- a/deps/icu-small/source/common/localefallback_data.h +++ b/deps/icu-small/source/common/localefallback_data.h @@ -11,1149 +11,1171 @@ //====================================================================== // Default script table const char scriptCodeChars[] = - "Aghb\0Ahom\0Arab\0Armi\0Armn\0Avst\0Bali\0Bamu\0Bass\0Batk\0Beng\0" - "Bopo\0Brah\0Cakm\0Cans\0Cari\0Cham\0Cher\0Chrs\0Copt\0Cprt\0Cyrl\0" - "Deva\0Egyp\0Elym\0Ethi\0Geor\0Gong\0Gonm\0Goth\0Gran\0Grek\0Gujr\0" - "Guru\0Hang\0Hani\0Hans\0Hant\0Hebr\0Hluw\0Hmnp\0Ital\0Java\0Jpan\0" - "Kali\0Kana\0Khar\0Khmr\0Kits\0Knda\0Kore\0Lana\0Laoo\0Latf\0Latg\0" - "Lepc\0Lina\0Linb\0Lisu\0Lyci\0Lydi\0Mand\0Mani\0Marc\0Medf\0Merc\0" - "Mlym\0Modi\0Mong\0Mroo\0Mtei\0Mymr\0Narb\0Newa\0Nkoo\0Nshu\0Ogam\0" - "Olck\0Orkh\0Orya\0Osge\0Ougr\0Pauc\0Phli\0Phnx\0Plrd\0Prti\0Rjng\0" - "Rohg\0Runr\0Samr\0Sarb\0Saur\0Sgnw\0Sinh\0Sogd\0Sora\0Soyo\0Sunu\0" - "Syrc\0Tagb\0Takr\0Tale\0Talu\0Taml\0Tang\0Tavt\0Telu\0Tfng\0Thaa\0" - "Thai\0Tibt\0Tnsa\0Toto\0Ugar\0Vaii\0Wcho\0Xpeo\0Xsux\0Yiii\0"; + "Aghb\0Ahom\0Arab\0Armi\0Armn\0Avst\0Bali\0Bamu\0Batk\0Beng\0Bopo\0" + "Brah\0Cakm\0Cans\0Cari\0Cham\0Cher\0Chrs\0Copt\0Cprt\0Cyrl\0Deva\0" + "Egyp\0Elym\0Ethi\0Geor\0Gong\0Gonm\0Goth\0Gran\0Grek\0Gujr\0Guru\0" + "Hang\0Hani\0Hans\0Hant\0Hebr\0Hluw\0Hmnp\0Ital\0Java\0Jpan\0Kali\0" + "Kana\0Khar\0Khmr\0Kits\0Knda\0Kore\0Lana\0Laoo\0Latf\0Latg\0Lepc\0" + "Lina\0Linb\0Lisu\0Lyci\0Lydi\0Mand\0Mani\0Marc\0Medf\0Merc\0Mlym\0" + "Modi\0Mong\0Mroo\0Mtei\0Mymr\0Narb\0Newa\0Nkoo\0Ogam\0Olck\0Orkh\0" + "Orya\0Osge\0Ougr\0Pauc\0Phli\0Phnx\0Plrd\0Prti\0Rjng\0Rohg\0Runr\0" + "Samr\0Sarb\0Saur\0Sgnw\0Sidt\0Sinh\0Sogd\0Sora\0Soyo\0Syrc\0Tagb\0" + "Takr\0Tale\0Talu\0Taml\0Tang\0Tavt\0Telu\0Tfng\0Thaa\0Thai\0Tibt\0" + "Tnsa\0Toto\0Ugar\0Vaii\0Wcho\0Xpeo\0Xsux\0Yiii\0"; const char dsLocaleIDChars[] = - "aaf\0aao\0aat\0ab\0abh\0abl\0abv\0acm\0acq\0acw\0acx\0adf\0adx\0" - "ady\0ae\0aeb\0aec\0aee\0aeq\0afb\0agi\0agj\0agx\0ahg\0aho\0ahr\0" - "aib\0aii\0aij\0ain\0aio\0aiq\0akk\0akv\0alk\0all\0alr\0alt\0alw\0" - "am\0ams\0amw\0ani\0anp\0anq\0anr\0anu\0aot\0apc\0apd\0aph\0aqc\0" - "ar\0arc\0arq\0ars\0ary\0arz\0as\0ase\0ask\0asr\0atn\0atv\0auj\0" - "auz\0av\0avd\0avl\0awa\0awn\0axm\0ayh\0ayl\0ayn\0ayp\0az_IQ\0" + "aaf\0aao\0aat\0ab\0abh\0abl\0abq\0abv\0acm\0acq\0acw\0acx\0adf\0" + "adx\0ady\0ae\0aeb\0aec\0aee\0aeq\0afb\0agi\0agj\0agx\0ahg\0aho\0" + "ahr\0aib\0aii\0aij\0ain\0aio\0aiq\0akk\0akv\0alk\0all\0alr\0alt\0" + "alw\0am\0ams\0amw\0ani\0anp\0anq\0anr\0anu\0aot\0apc\0apd\0aph\0" + "aqc\0ar\0arc\0arq\0ars\0ary\0arz\0as\0ase\0ask\0asr\0atn\0atv\0" + "auj\0auz\0av\0avd\0avl\0awa\0awn\0axm\0ayh\0ayl\0ayn\0ayp\0az_IQ\0" "az_IR\0az_RU\0azb\0ba\0bal\0bap\0bax\0bbl\0bcq\0bdv\0bdz\0be\0" "bee\0bej\0bfb\0bfq\0bft\0bfu\0bfw\0bfy\0bfz\0bg\0bgc\0bgd\0bgn\0" "bgp\0bgq\0bgw\0bgx\0bha\0bhb\0bhd\0bhe\0bhh\0bhi\0bhj\0bhm\0bhn\0" - "bho\0bht\0bhu\0biy\0bjf\0bjj\0bjm\0bkk\0blk\0blt\0bmj\0bn\0bns\0" - "bo\0bph\0bpx\0bpy\0bqi\0bra\0brb\0brd\0brh\0brk\0bro\0brv\0brw\0" - "brx\0bsh\0bsk\0bsq\0bst\0btd\0btm\0btv\0bua\0bwe\0bxm\0bxu\0byh\0" - "byn\0byw\0bzi\0cbn\0ccp\0cde\0cdh\0cdi\0cdj\0cdm\0cdo\0cdz\0ce\0" - "cgk\0chg\0chm\0chr\0chx\0cih\0cja\0cji\0cjm\0cjy\0ckb\0ckt\0clh\0" - "clw\0cmg\0cna\0cnp\0cog\0cop\0cpg\0cr\0crh\0crj\0crk\0crl\0crm\0" - "csh\0csp\0csw\0ctd\0ctg\0ctn\0ctt\0cty\0cu\0cuu\0cv\0czh\0czk\0" - "daq\0dar\0dcc\0ddo\0def\0deh\0der\0dgl\0dhi\0dhn\0dho\0dhw\0dka\0" - "dlg\0dmf\0dmk\0dml\0dng\0dnu\0dnv\0doi\0dox\0dre\0drq\0drs\0dry\0" - "dso\0dty\0dub\0duh\0dus\0dv\0dwk\0dwz\0dz\0dzl\0ecr\0ecy\0egy\0" - "eky\0el\0emg\0emu\0enf\0enh\0era\0esg\0esh\0ett\0eve\0evn\0fa\0" - "fay\0faz\0fia\0fmu\0fub\0gan\0gaq\0gas\0gau\0gbj\0gbk\0gbl\0gbm\0" - "gbz\0gdb\0gdo\0gdx\0gez\0ggg\0gha\0ghe\0gho\0ghr\0ght\0gig\0gin\0" - "gjk\0gju\0gld\0glh\0glk\0gml\0gmv\0gmy\0goe\0gof\0goj\0gok\0gon\0" - "got\0gra\0grc\0grt\0gru\0gu\0gvr\0gwc\0gwf\0gwt\0gyo\0gzi\0ha_CM\0" - "ha_SD\0hac\0hak\0hak_TW\0har\0haz\0hbo\0hdy\0he\0hi\0hif\0hii\0" - "hit\0hkh\0hlb\0hlu\0hmd\0hmj\0hmq\0hnd\0hne\0hnj\0hno\0hoc\0hoh\0" - "hoj\0how\0hoy\0hpo\0hrt\0hrz\0hsn\0hss\0htx\0hut\0huy\0huz\0hy\0" - "hyw\0ii\0imy\0inh\0int\0ior\0iru\0isk\0itk\0itl\0iu\0iw\0ja\0" - "jad\0jat\0jbe\0jbn\0jct\0jda\0jdg\0jdt\0jee\0jge\0ji\0jje\0jkm\0" - "jml\0jna\0jnd\0jnl\0jns\0jog\0jpa\0jpr\0jrb\0jul\0jun\0juy\0jya\0" - "jye\0ka\0kaa\0kap\0kaw\0kbd\0kbg\0kbu\0kby\0kca\0kcy\0kdq\0kdt\0" - "ket\0kev\0kex\0key\0kfa\0kfb\0kfc\0kfd\0kfe\0kfg\0kfh\0kfi\0kfk\0" - "kfm\0kfp\0kfq\0kfr\0kfs\0kfu\0kfx\0kfy\0kgj\0kgy\0khb\0khf\0khg\0" - "khn\0kho\0kht\0khv\0khw\0kif\0kim\0kip\0kjg\0kjh\0kjl\0kjo\0kjp\0" - "kjt\0kjz\0kk\0kk_AF\0kk_CN\0kk_IR\0kk_MN\0kkf\0kkh\0kkt\0kle\0" - "klj\0klr\0km\0kmj\0kmz\0kn\0knn\0ko\0koi\0kok\0kpt\0kpy\0kqd\0" - "kqy\0kra\0krc\0krk\0krr\0kru\0krv\0ks\0ksu\0ksw\0ksz\0ktb\0kte\0" - "ktl\0ktp\0ku_LB\0kuf\0kum\0kv\0kva\0kvq\0kvt\0kvx\0kvy\0kxf\0" + "bho\0bht\0bhu\0bix\0biy\0bjf\0bjj\0bjm\0bkk\0blk\0blt\0bmj\0bn\0" + "bns\0bo\0bph\0bpx\0bpy\0bqi\0bra\0brb\0brd\0brh\0brk\0bro\0brv\0" + "brw\0brx\0bsh\0bsk\0bst\0btd\0btm\0btv\0bua\0bwe\0bxm\0bxu\0byh\0" + "byn\0byw\0bzi\0cbn\0ccp\0cde\0cdh\0cdi\0cdj\0cdm\0cdn\0cdo\0cdz\0" + "ce\0cgk\0chg\0chm\0chr\0chx\0cih\0cja\0cji\0cjm\0cjy\0ckb\0ckt\0" + "clh\0clw\0cmg\0cna\0cnp\0cog\0cop\0cpg\0cr\0crh\0crj\0crk\0crl\0" + "crm\0csh\0csp\0csw\0ctd\0ctg\0ctn\0ctt\0cty\0cu\0cuu\0cv\0czh\0" + "czk\0daq\0dar\0dcc\0ddo\0def\0deh\0der\0dgl\0dhi\0dhn\0dho\0dhw\0" + "dka\0dlg\0dmf\0dmk\0dml\0dng\0dnu\0dnv\0doi\0dox\0dre\0drq\0drs\0" + "dry\0dso\0dty\0dub\0duh\0dus\0dv\0dwk\0dwz\0dz\0dzl\0ecr\0ecy\0" + "egy\0eky\0el\0emg\0emu\0enf\0enh\0era\0esg\0esh\0ett\0eve\0evn\0" + "fa\0fay\0faz\0fia\0fmu\0fub\0gan\0gaq\0gas\0gau\0gbj\0gbk\0gbl\0" + "gbm\0gbz\0gdb\0gdo\0gdx\0gez\0ggg\0gha\0ghe\0gho\0ghr\0ght\0gig\0" + "gin\0gjk\0gju\0gld\0glh\0glk\0gml\0gmv\0gmy\0goe\0gof\0goj\0gok\0" + "gon\0got\0gra\0grc\0grr\0grt\0gru\0gu\0gvr\0gwc\0gwf\0gwt\0gyo\0" + "gzi\0ha_CM\0ha_SD\0hac\0hak\0hak_TW\0har\0haz\0hbo\0hdy\0he\0" + "hi\0hif\0hii\0hit\0hkh\0hlb\0hlu\0hmd\0hmj\0hmq\0hnd\0hne\0hnj\0" + "hnm\0hno\0hoc\0hoh\0hoj\0how\0hoy\0hpo\0hrt\0hrz\0hsn\0hss\0htx\0" + "hut\0huy\0huz\0hy\0hyw\0ii\0imy\0inh\0int\0ior\0iru\0isk\0itk\0" + "itl\0iu\0iw\0ja\0jad\0jat\0jbe\0jbn\0jct\0jda\0jdg\0jdt\0jee\0" + "jge\0ji\0jje\0jkm\0jml\0jna\0jnd\0jnl\0jns\0jog\0jpa\0jpr\0jrb\0" + "jul\0jun\0juy\0jya\0jye\0ka\0kaa\0kap\0kaw\0kbd\0kbg\0kbu\0kby\0" + "kca\0kcy\0kdq\0kdt\0ket\0kev\0kex\0key\0kfa\0kfb\0kfc\0kfd\0kfe\0" + "kfg\0kfh\0kfi\0kfk\0kfm\0kfp\0kfq\0kfr\0kfs\0kfu\0kfx\0kfy\0kgj\0" + "kgy\0khb\0khf\0khg\0khn\0kho\0kht\0khv\0khw\0kif\0kim\0kip\0kjg\0" + "kjh\0kjl\0kjo\0kjp\0kjt\0kjz\0kk\0kk_AF\0kk_CN\0kk_IR\0kk_MN\0" + "kkf\0kkh\0kkt\0kle\0klj\0klr\0km\0kmj\0kmz\0kn\0knn\0ko\0koi\0" + "kok\0kpt\0kpy\0kqd\0kqy\0kra\0krc\0krk\0krr\0kru\0krv\0ks\0ksu\0" + "ksw\0ksz\0ktb\0kte\0ktl\0ktp\0ku_AM\0ku_AZ\0ku_GE\0ku_IQ\0ku_IR\0" + "ku_LB\0ku_TM\0kuf\0kum\0kv\0kva\0kvq\0kvt\0kvx\0kvy\0kwx\0kxf\0" "kxk\0kxm\0kxp\0ky\0ky_CN\0kyu\0kyv\0kyw\0lab\0lad\0lae\0lah\0" "lbe\0lbf\0lbj\0lbm\0lbo\0lbr\0lcp\0lep\0lez\0lhm\0lhs\0lif\0lis\0" "lkh\0lki\0lmh\0lmn\0lo\0loy\0lpo\0lrc\0lrk\0lrl\0lsa\0lsd\0lss\0" - "ltc\0luk\0luu\0luv\0luz\0lwl\0lwm\0lya\0lzh\0lzz_GE\0mag\0mai\0" - "mby\0mde\0mdf\0mdx\0mdy\0mfa\0mfi\0mga\0mgp\0mhj\0mid\0mjl\0mjq\0" - "mjr\0mjt\0mju\0mjv\0mjz\0mk\0mkb\0mke\0mki\0mkm\0ml\0mlf\0mn\0" - "mn_CN\0mnc\0mni\0mnj\0mns\0mnw\0mpz\0mr\0mra\0mrd\0mrj\0mro\0" - "mrr\0ms_CC\0mtm\0mtr\0mud\0muk\0mut\0muv\0muz\0mve\0mvf\0mvy\0" - "mvz\0mwr\0mwt\0mww\0my\0mym\0myv\0myz\0mzn\0nan\0nan_TW\0nao\0" - "ncd\0ncq\0ndf\0ne\0neg\0neh\0nei\0new\0ngt\0nio\0nit\0niv\0nli\0" - "nlm\0nlx\0nmm\0nnp\0nod\0noe\0nog\0noi\0non\0nos\0npb\0nqo\0nrn\0" - "nsd\0nsf\0nsk\0nst\0nsv\0nty\0ntz\0nwc\0nwx\0nyl\0nyq\0nyw\0oaa\0" - "oac\0oar\0oav\0obm\0obr\0odk\0oht\0oj\0ojs\0okm\0oko\0okz\0ola\0" - "ole\0omk\0omp\0omr\0omx\0oon\0or\0ort\0oru\0orv\0os\0osa\0osc\0" - "osi\0ota\0otb\0otk\0oty\0oui\0pa\0pa_PK\0pal\0paq\0pbt\0pcb\0" - "pce\0pcf\0pcg\0pch\0pci\0pcj\0peg\0peo\0pgd\0pgg\0pgl\0pgn\0phd\0" - "phk\0phl\0phn\0pho\0phr\0pht\0phu\0phv\0phw\0pi\0pka\0pkr\0plk\0" - "pll\0pmh\0pnt\0pnt_RU\0pra\0prc\0prd\0prt\0prx\0ps\0psh\0psi\0" - "pst\0psu\0pum\0pwo\0pwr\0pww\0pyx\0qxq\0raa\0rab\0raf\0rah\0raj\0" - "rav\0rbb\0rdb\0rei\0rhg\0rji\0rjs\0rka\0rki\0rkt\0rmi\0rmt\0rmz\0" - "rsk\0rtw\0ru\0rue\0rut\0rwr\0ryu\0sa\0sah\0sam\0sat\0saz\0sbn\0" - "sbu\0sck\0scl\0scp\0sct\0scu\0scx\0sd\0sd_IN\0sdb\0sdf\0sdg\0" - "sdh\0sdr\0sds\0sel\0sfm\0sgh\0sgj\0sgr\0sgt\0sgw\0sgy\0shd\0shi\0" - "shm\0shn\0shu\0shv\0si\0sia\0sip\0siy\0siz\0sjd\0sjp\0sjt\0skb\0" - "skj\0skr\0smh\0smp\0smu\0smy\0soa\0sog\0soi\0sou\0spt\0spv\0sqo\0" - "sqq\0sqt\0sr\0srb\0srh\0srx\0srz\0ssh\0sss\0sts\0stv\0sty\0suz\0" - "sva\0swb\0swi\0swv\0sxu\0syc\0syl\0syn\0syr\0syw\0ta\0tab\0taj\0" - "tbk\0tcn\0tco\0tcx\0tcy\0tda\0tdb\0tdd\0tdg\0tdh\0te\0tes\0tg\0" - "tg_PK\0tge\0tgf\0th\0the\0thf\0thi\0thl\0thm\0thq\0thr\0ths\0" - "ti\0tig\0tij\0tin\0tjl\0tjo\0tkb\0tks\0tkt\0tmr\0tnv\0tov\0tpu\0" - "tra\0trg\0trm\0trw\0tsd\0tsj\0tt\0tth\0tto\0tts\0ttz\0tvn\0twm\0" - "txg\0txo\0tyr\0tyv\0ude\0udg\0udi\0udm\0ug\0ug_KZ\0ug_MN\0uga\0" - "ugh\0ugo\0uk\0uki\0ulc\0unr\0unr_NP\0unx\0ur\0urk\0ush\0uum\0" - "uz_AF\0uz_CN\0uzs\0vaa\0vaf\0vah\0vai\0vas\0vav\0vay\0vgr\0vjk\0" - "vmd\0vmh\0wal\0wbk\0wbq\0wbr\0wle\0wlo\0wme\0wne\0wni\0wsg\0wsv\0" - "wtm\0wuu\0xag\0xal\0xan\0xas\0xco\0xcr\0xdq\0xhe\0xhm\0xis\0xka\0" - "xkc\0xkf\0xkj\0xkp\0xlc\0xld\0xly\0xmf\0xmn\0xmr\0xna\0xnr\0xpg\0" - "xpi\0xpm\0xpr\0xrm\0xrn\0xsa\0xsr\0xtq\0xub\0xuj\0xve\0xvi\0xwo\0" - "xzh\0yai\0ybh\0ybi\0ydg\0yea\0yej\0yeu\0ygp\0yhd\0yi\0yig\0yih\0" - "yiv\0ykg\0ykh\0yna\0ynk\0yoi\0yoy\0yrk\0ysd\0ysn\0ysp\0ysr\0ysy\0" - "yud\0yue\0yue_CN\0yug\0yux\0ywq\0ywu\0zau\0zba\0zch\0zdj\0zeh\0" - "zen\0zgb\0zgh\0zgm\0zgn\0zh\0zh_AU\0zh_BN\0zh_GB\0zh_GF\0zh_HK\0" - "zh_ID\0zh_MO\0zh_PA\0zh_PF\0zh_PH\0zh_SR\0zh_TH\0zh_TW\0zh_US\0" - "zh_VN\0zhd\0zhx\0zko\0zkt\0zkz\0zlj\0zln\0zlq\0zqe\0zrg\0zrp\0" - "zum\0zwa\0zyg\0zyn\0zzj\0"; + "ltc\0luh\0luk\0luu\0luv\0luz\0lwl\0lwm\0lya\0lzh\0lzz_GE\0mag\0" + "mai\0mby\0mde\0mdf\0mdx\0mdy\0mey\0mfa\0mfi\0mga\0mgp\0mhj\0mid\0" + "mjl\0mjq\0mjr\0mjt\0mju\0mjv\0mjz\0mk\0mkb\0mke\0mki\0mkm\0ml\0" + "mlf\0mn\0mn_CN\0mnc\0mni\0mnj\0mns\0mnw\0mpz\0mr\0mra\0mrd\0mrj\0" + "mro\0mrr\0ms_CC\0mtm\0mtr\0mud\0muk\0mut\0muv\0muz\0mve\0mvf\0" + "mvy\0mvz\0mwr\0mwt\0mww\0my\0mym\0myv\0myz\0mzb\0mzn\0nan\0nan_MO\0" + "nan_TW\0nao\0ncd\0ncq\0ndf\0ne\0neg\0neh\0nei\0new\0ngt\0nio\0" + "nit\0niv\0nli\0nlm\0nlx\0nmm\0nnp\0nod\0noe\0nog\0noi\0non\0nos\0" + "npb\0nqo\0nrn\0nsd\0nsf\0nsk\0nst\0nsv\0nty\0ntz\0nwc\0nwx\0nyl\0" + "nyq\0nyw\0oaa\0oac\0oar\0oav\0obm\0obr\0odk\0oht\0oj\0ojs\0okm\0" + "oko\0okz\0ola\0ole\0omk\0omp\0omr\0omx\0oon\0or\0ort\0oru\0orv\0" + "os\0osa\0osc\0osi\0ota\0otb\0otk\0oty\0oui\0oyb\0pa\0pa_PK\0pal\0" + "paq\0pbt\0pcb\0pce\0pcf\0pcg\0pch\0pci\0pcj\0peg\0peo\0pgd\0pgg\0" + "pgl\0pgn\0phd\0phk\0phl\0phn\0pho\0phr\0pht\0phu\0phv\0phw\0pi_IN\0" + "pi_LK\0pi_MM\0pi_TH\0pka\0pkr\0plk\0pll\0pmh\0pnt\0pnt_RU\0prc\0" + "prd\0prt\0prx\0ps\0psh\0psi\0pst\0psu\0pum\0pwo\0pwr\0pww\0pyx\0" + "qxq\0raa\0rab\0raf\0rah\0raj\0rav\0rbb\0rdb\0rei\0rhg\0rji\0rjs\0" + "rka\0rki\0rkt\0rmi\0rmt\0rmz\0rsk\0rtw\0ru\0rue\0rut\0rwr\0ryu\0" + "sa\0sah\0sam\0sat\0saz\0sbn\0sbu\0sck\0scl\0scp\0sct\0scu\0scx\0" + "sd\0sd_IN\0sdb\0sdf\0sdg\0sdh\0sdr\0sds\0sel\0sfm\0sgh\0sgj\0" + "sgr\0sgt\0sgw\0sgy\0shd\0shi\0shm\0shn\0shu\0shv\0si\0sia\0sip\0" + "siy\0siz\0sjc\0sjd\0sjp\0sjt\0skb\0skj\0skr\0smh\0smp\0smu\0smy\0" + "soa\0sog\0soi\0sou\0spt\0spv\0sqo\0sqq\0sqt\0sr\0srb\0srh\0srx\0" + "srz\0ssh\0sss\0sts\0stu\0stu_CN\0stv\0sty\0suz\0sva\0swb\0swi\0" + "swv\0sxu\0syc\0syl\0syn\0syr\0syw\0ta\0tab\0taj\0tbk\0tcn\0tco\0" + "tcx\0tcy\0tda\0tdb\0tdd\0tdg\0tdh\0te\0tes\0tg\0tg_PK\0tge\0tgf\0" + "th\0the\0thf\0thi\0thl\0thm\0thq\0thr\0ths\0ti\0tig\0tij\0tin\0" + "tjl\0tjo\0tkb\0tks\0tkt\0tmr\0tnv\0tov\0tpu\0tra\0trg\0trm\0trw\0" + "tsd\0tsj\0tt\0tth\0tto\0tts\0ttz\0tvn\0twm\0txg\0txo\0tyr\0tyv\0" + "ude\0udg\0udi\0udm\0ug\0ug_KZ\0ug_MN\0uga\0ugh\0ugo\0uk\0uki\0" + "ulc\0unr\0unr_NP\0unx\0ur\0urk\0ush\0uum\0uz_AF\0uz_CN\0uzs\0" + "vaa\0vaf\0vah\0vai\0vas\0vav\0vay\0vgr\0vjk\0vmd\0vmh\0wal\0wbk\0" + "wbq\0wbr\0wle\0wlo\0wme\0wne\0wni\0wsg\0wsv\0wtm\0wuu\0xag\0xal\0" + "xan\0xas\0xco\0xcr\0xdq\0xhe\0xhm\0xis\0xka\0xkc\0xkf\0xkj\0xkp\0" + "xlc\0xld\0xly\0xmf\0xmn\0xmr\0xna\0xnr\0xpg\0xpi\0xpm\0xpr\0xrm\0" + "xrn\0xsa\0xsd\0xsr\0xtq\0xub\0xuj\0xve\0xvi\0xwo\0xzh\0yai\0ybh\0" + "ybi\0ydg\0yea\0yej\0yeu\0ygp\0yhd\0yi\0yig\0yih\0yiv\0ykg\0ykh\0" + "yna\0ynk\0yoi\0yoy\0yrk\0ysd\0ysn\0ysp\0ysr\0ysy\0yud\0yue\0yue_CN\0" + "yug\0yux\0ywq\0ywu\0zau\0zba\0zch\0zdj\0zeh\0zen\0zgb\0zgh\0zgm\0" + "zgn\0zh\0zh_AU\0zh_BN\0zh_GB\0zh_GF\0zh_HK\0zh_ID\0zh_MO\0zh_PA\0" + "zh_PF\0zh_PH\0zh_SR\0zh_TH\0zh_TW\0zh_US\0zh_VN\0zhd\0zko\0zkt\0" + "zkz\0zlj\0zln\0zlq\0zqe\0zrg\0zrp\0zum\0zwa\0zyg\0zyn\0zzj\0"; const int32_t defaultScriptTable[] = { - 0, 330, // aaf -> Mlym + 0, 325, // aaf -> Mlym 4, 10, // aao -> Arab - 8, 155, // aat -> Grek - 12, 105, // ab -> Cyrl + 8, 150, // aat -> Grek + 12, 100, // ab -> Cyrl 15, 10, // abh -> Arab - 19, 435, // abl -> Rjng - 23, 10, // abv -> Arab - 27, 10, // acm -> Arab - 31, 10, // acq -> Arab - 35, 10, // acw -> Arab - 39, 10, // acx -> Arab - 43, 10, // adf -> Arab - 47, 555, // adx -> Tibt - 51, 105, // ady -> Cyrl - 55, 25, // ae -> Avst - 58, 10, // aeb -> Arab - 62, 10, // aec -> Arab - 66, 10, // aee -> Arab - 70, 10, // aeq -> Arab - 74, 10, // afb -> Arab - 78, 110, // agi -> Deva - 82, 125, // agj -> Ethi - 86, 105, // agx -> Cyrl - 90, 125, // ahg -> Ethi - 94, 5, // aho -> Ahom - 98, 110, // ahr -> Deva - 102, 10, // aib -> Arab - 106, 495, // aii -> Syrc - 110, 190, // aij -> Hebr - 114, 225, // ain -> Kana - 118, 355, // aio -> Mymr - 122, 10, // aiq -> Arab - 126, 590, // akk -> Xsux - 130, 105, // akv -> Cyrl - 134, 260, // alk -> Laoo - 138, 330, // all -> Mlym - 142, 105, // alr -> Cyrl - 146, 105, // alt -> Cyrl - 150, 125, // alw -> Ethi - 154, 125, // am -> Ethi - 157, 215, // ams -> Jpan - 161, 495, // amw -> Syrc - 165, 105, // ani -> Cyrl - 169, 110, // anp -> Deva - 173, 110, // anq -> Deva - 177, 110, // anr -> Deva - 181, 125, // anu -> Ethi - 185, 50, // aot -> Beng - 189, 10, // apc -> Arab - 193, 10, // apd -> Arab - 197, 110, // aph -> Deva - 201, 105, // aqc -> Cyrl - 205, 10, // ar -> Arab - 208, 15, // arc -> Armi - 212, 10, // arq -> Arab - 216, 10, // ars -> Arab - 220, 10, // ary -> Arab - 224, 10, // arz -> Arab - 228, 50, // as -> Beng - 231, 465, // ase -> Sgnw - 235, 10, // ask -> Arab - 239, 110, // asr -> Deva - 243, 10, // atn -> Arab - 247, 105, // atv -> Cyrl - 251, 10, // auj -> Arab - 255, 10, // auz -> Arab - 259, 105, // av -> Cyrl - 262, 10, // avd -> Arab - 266, 10, // avl -> Arab - 270, 110, // awa -> Deva - 274, 125, // awn -> Ethi - 278, 20, // axm -> Armn - 282, 10, // ayh -> Arab - 286, 10, // ayl -> Arab - 290, 10, // ayn -> Arab - 294, 10, // ayp -> Arab - 298, 10, // az_IQ -> Arab - 304, 10, // az_IR -> Arab - 310, 105, // az_RU -> Cyrl - 316, 10, // azb -> Arab - 320, 105, // ba -> Cyrl - 323, 10, // bal -> Arab - 327, 110, // bap -> Deva - 331, 35, // bax -> Bamu - 335, 130, // bbl -> Geor - 339, 125, // bcq -> Ethi - 343, 395, // bdv -> Orya - 347, 10, // bdz -> Arab - 351, 105, // be -> Cyrl - 354, 110, // bee -> Deva - 358, 10, // bej -> Arab - 362, 110, // bfb -> Deva - 366, 520, // bfq -> Taml - 370, 10, // bft -> Arab - 374, 555, // bfu -> Tibt - 378, 395, // bfw -> Orya - 382, 110, // bfy -> Deva - 386, 110, // bfz -> Deva - 390, 105, // bg -> Cyrl - 393, 110, // bgc -> Deva - 397, 110, // bgd -> Deva - 401, 10, // bgn -> Arab - 405, 10, // bgp -> Arab - 409, 110, // bgq -> Deva - 413, 110, // bgw -> Deva - 417, 155, // bgx -> Grek - 421, 110, // bha -> Deva - 425, 110, // bhb -> Deva - 429, 110, // bhd -> Deva - 433, 10, // bhe -> Arab - 437, 105, // bhh -> Cyrl - 441, 110, // bhi -> Deva - 445, 110, // bhj -> Deva - 449, 10, // bhm -> Arab - 453, 495, // bhn -> Syrc - 457, 110, // bho -> Deva - 461, 110, // bht -> Deva - 465, 110, // bhu -> Deva - 469, 110, // biy -> Deva - 473, 495, // bjf -> Syrc - 477, 110, // bjj -> Deva - 481, 10, // bjm -> Arab - 485, 555, // bkk -> Tibt - 489, 355, // blk -> Mymr - 493, 530, // blt -> Tavt - 497, 110, // bmj -> Deva - 501, 50, // bn -> Beng - 504, 110, // bns -> Deva - 508, 555, // bo -> Tibt - 511, 105, // bph -> Cyrl - 515, 110, // bpx -> Deva - 519, 50, // bpy -> Beng - 523, 10, // bqi -> Arab - 527, 110, // bra -> Deva - 531, 235, // brb -> Khmr - 535, 110, // brd -> Deva - 539, 10, // brh -> Arab - 543, 10, // brk -> Arab - 547, 555, // bro -> Tibt - 551, 260, // brv -> Laoo - 555, 245, // brw -> Knda - 559, 110, // brx -> Deva - 563, 10, // bsh -> Arab - 567, 10, // bsk -> Arab - 571, 40, // bsq -> Bass - 575, 125, // bst -> Ethi - 579, 45, // btd -> Batk - 583, 45, // btm -> Batk - 587, 110, // btv -> Deva - 591, 105, // bua -> Cyrl - 595, 355, // bwe -> Mymr - 599, 105, // bxm -> Cyrl - 603, 340, // bxu -> Mong - 607, 110, // byh -> Deva - 611, 125, // byn -> Ethi - 615, 110, // byw -> Deva - 619, 550, // bzi -> Thai - 623, 550, // cbn -> Thai - 627, 65, // ccp -> Cakm - 631, 535, // cde -> Telu - 635, 110, // cdh -> Deva - 639, 160, // cdi -> Gujr - 643, 110, // cdj -> Deva - 647, 110, // cdm -> Deva - 651, 180, // cdo -> Hans - 655, 50, // cdz -> Beng - 659, 105, // ce -> Cyrl - 662, 555, // cgk -> Tibt - 666, 10, // chg -> Arab - 670, 105, // chm -> Cyrl - 674, 85, // chr -> Cher - 678, 110, // chx -> Deva - 682, 110, // cih -> Deva - 686, 10, // cja -> Arab - 690, 105, // cji -> Cyrl - 694, 80, // cjm -> Cham - 698, 180, // cjy -> Hans - 702, 10, // ckb -> Arab - 706, 105, // ckt -> Cyrl - 710, 10, // clh -> Arab - 714, 105, // clw -> Cyrl - 718, 485, // cmg -> Soyo - 722, 555, // cna -> Tibt - 726, 180, // cnp -> Hans - 730, 550, // cog -> Thai - 734, 95, // cop -> Copt - 738, 155, // cpg -> Grek - 742, 70, // cr -> Cans - 745, 105, // crh -> Cyrl - 749, 70, // crj -> Cans - 753, 70, // crk -> Cans - 757, 70, // crl -> Cans - 761, 70, // crm -> Cans - 765, 355, // csh -> Mymr - 769, 180, // csp -> Hans - 773, 70, // csw -> Cans - 777, 410, // ctd -> Pauc - 781, 50, // ctg -> Beng - 785, 110, // ctn -> Deva - 789, 520, // ctt -> Taml - 793, 520, // cty -> Taml - 797, 105, // cu -> Cyrl - 800, 255, // cuu -> Lana - 804, 105, // cv -> Cyrl - 807, 180, // czh -> Hans - 811, 190, // czk -> Hebr - 815, 110, // daq -> Deva - 819, 105, // dar -> Cyrl - 823, 10, // dcc -> Arab - 827, 105, // ddo -> Cyrl - 831, 10, // def -> Arab - 835, 10, // deh -> Arab - 839, 50, // der -> Beng - 843, 10, // dgl -> Arab - 847, 110, // dhi -> Deva - 851, 160, // dhn -> Gujr - 855, 110, // dho -> Deva - 859, 110, // dhw -> Deva - 863, 555, // dka -> Tibt - 867, 105, // dlg -> Cyrl - 871, 320, // dmf -> Medf - 875, 10, // dmk -> Arab - 879, 10, // dml -> Arab - 883, 105, // dng -> Cyrl - 887, 355, // dnu -> Mymr - 891, 355, // dnv -> Mymr - 895, 110, // doi -> Deva - 899, 125, // dox -> Ethi - 903, 555, // dre -> Tibt - 907, 110, // drq -> Deva - 911, 125, // drs -> Ethi - 915, 110, // dry -> Deva - 919, 395, // dso -> Orya - 923, 110, // dty -> Deva - 927, 160, // dub -> Gujr - 931, 110, // duh -> Deva - 935, 110, // dus -> Deva - 939, 545, // dv -> Thaa - 942, 395, // dwk -> Orya - 946, 110, // dwz -> Deva - 950, 555, // dz -> Tibt - 953, 555, // dzl -> Tibt - 957, 155, // ecr -> Grek - 961, 100, // ecy -> Cprt - 965, 115, // egy -> Egyp - 969, 220, // eky -> Kali - 973, 155, // el -> Grek - 976, 110, // emg -> Deva - 980, 110, // emu -> Deva - 984, 105, // enf -> Cyrl - 988, 105, // enh -> Cyrl - 992, 520, // era -> Taml - 996, 140, // esg -> Gonm - 1000, 10, // esh -> Arab - 1004, 205, // ett -> Ital - 1008, 105, // eve -> Cyrl - 1012, 105, // evn -> Cyrl - 1016, 10, // fa -> Arab - 1019, 10, // fay -> Arab - 1023, 10, // faz -> Arab - 1027, 10, // fia -> Arab - 1031, 110, // fmu -> Deva - 1035, 10, // fub -> Arab - 1039, 180, // gan -> Hans - 1043, 395, // gaq -> Orya - 1047, 160, // gas -> Gujr - 1051, 535, // gau -> Telu - 1055, 395, // gbj -> Orya - 1059, 110, // gbk -> Deva - 1063, 160, // gbl -> Gujr - 1067, 110, // gbm -> Deva - 1071, 10, // gbz -> Arab - 1075, 395, // gdb -> Orya - 1079, 105, // gdo -> Cyrl - 1083, 110, // gdx -> Deva - 1087, 125, // gez -> Ethi - 1091, 10, // ggg -> Arab - 1095, 10, // gha -> Arab - 1099, 110, // ghe -> Deva - 1103, 540, // gho -> Tfng - 1107, 10, // ghr -> Arab - 1111, 555, // ght -> Tibt - 1115, 10, // gig -> Arab - 1119, 105, // gin -> Cyrl - 1123, 10, // gjk -> Arab - 1127, 10, // gju -> Arab - 1131, 105, // gld -> Cyrl - 1135, 10, // glh -> Arab - 1139, 10, // glk -> Arab - 1143, 265, // gml -> Latf - 1147, 125, // gmv -> Ethi - 1151, 285, // gmy -> Linb - 1155, 555, // goe -> Tibt - 1159, 125, // gof -> Ethi - 1163, 110, // goj -> Deva - 1167, 110, // gok -> Deva - 1171, 110, // gon -> Deva - 1175, 145, // got -> Goth - 1179, 110, // gra -> Deva - 1183, 155, // grc -> Grek - 1187, 50, // grt -> Beng - 1191, 125, // gru -> Ethi - 1195, 160, // gu -> Gujr - 1198, 110, // gvr -> Deva - 1202, 10, // gwc -> Arab - 1206, 10, // gwf -> Arab - 1210, 10, // gwt -> Arab - 1214, 110, // gyo -> Deva - 1218, 10, // gzi -> Arab - 1222, 10, // ha_CM -> Arab - 1228, 10, // ha_SD -> Arab - 1234, 10, // hac -> Arab - 1238, 180, // hak -> Hans - 1242, 185, // hak_TW -> Hant - 1249, 125, // har -> Ethi - 1253, 10, // haz -> Arab - 1257, 190, // hbo -> Hebr - 1261, 125, // hdy -> Ethi - 1265, 190, // he -> Hebr - 1268, 110, // hi -> Deva - 1271, 110, // hif -> Deva - 1275, 505, // hii -> Takr - 1279, 590, // hit -> Xsux - 1283, 10, // hkh -> Arab - 1287, 110, // hlb -> Deva - 1291, 195, // hlu -> Hluw - 1295, 425, // hmd -> Plrd - 1299, 55, // hmj -> Bopo - 1303, 55, // hmq -> Bopo - 1307, 10, // hnd -> Arab - 1311, 110, // hne -> Deva - 1315, 200, // hnj -> Hmnp - 1319, 10, // hno -> Arab - 1323, 110, // hoc -> Deva - 1327, 10, // hoh -> Arab - 1331, 110, // hoj -> Deva - 1335, 175, // how -> Hani - 1339, 110, // hoy -> Deva - 1343, 355, // hpo -> Mymr - 1347, 495, // hrt -> Syrc - 1351, 10, // hrz -> Arab - 1355, 180, // hsn -> Hans - 1359, 10, // hss -> Arab - 1363, 590, // htx -> Xsux - 1367, 110, // hut -> Deva - 1371, 190, // huy -> Hebr - 1375, 105, // huz -> Cyrl - 1379, 20, // hy -> Armn - 1382, 20, // hyw -> Armn - 1386, 595, // ii -> Yiii - 1389, 295, // imy -> Lyci - 1393, 105, // inh -> Cyrl - 1397, 355, // int -> Mymr - 1401, 125, // ior -> Ethi - 1405, 520, // iru -> Taml - 1409, 10, // isk -> Arab - 1413, 190, // itk -> Hebr - 1417, 105, // itl -> Cyrl - 1421, 70, // iu -> Cans - 1424, 190, // iw -> Hebr - 1427, 215, // ja -> Jpan - 1430, 10, // jad -> Arab - 1434, 10, // jat -> Arab - 1438, 190, // jbe -> Hebr - 1442, 10, // jbn -> Arab - 1446, 105, // jct -> Cyrl - 1450, 555, // jda -> Tibt - 1454, 10, // jdg -> Arab - 1458, 105, // jdt -> Cyrl - 1462, 110, // jee -> Deva - 1466, 130, // jge -> Geor - 1470, 190, // ji -> Hebr - 1473, 170, // jje -> Hang - 1477, 355, // jkm -> Mymr - 1481, 110, // jml -> Deva - 1485, 505, // jna -> Takr - 1489, 10, // jnd -> Arab - 1493, 110, // jnl -> Deva - 1497, 110, // jns -> Deva - 1501, 10, // jog -> Arab - 1505, 190, // jpa -> Hebr - 1509, 190, // jpr -> Hebr - 1513, 190, // jrb -> Hebr - 1517, 110, // jul -> Deva - 1521, 395, // jun -> Orya - 1525, 395, // juy -> Orya - 1529, 555, // jya -> Tibt - 1533, 190, // jye -> Hebr - 1537, 130, // ka -> Geor - 1540, 105, // kaa -> Cyrl - 1544, 105, // kap -> Cyrl - 1548, 30, // kaw -> Bali - 1552, 105, // kbd -> Cyrl - 1556, 555, // kbg -> Tibt - 1560, 10, // kbu -> Arab - 1564, 10, // kby -> Arab - 1568, 105, // kca -> Cyrl - 1572, 10, // kcy -> Arab - 1576, 50, // kdq -> Beng - 1580, 550, // kdt -> Thai - 1584, 105, // ket -> Cyrl - 1588, 330, // kev -> Mlym - 1592, 110, // kex -> Deva - 1596, 535, // key -> Telu - 1600, 245, // kfa -> Knda - 1604, 110, // kfb -> Deva - 1608, 535, // kfc -> Telu - 1612, 245, // kfd -> Knda - 1616, 520, // kfe -> Taml - 1620, 245, // kfg -> Knda - 1624, 330, // kfh -> Mlym - 1628, 520, // kfi -> Taml - 1632, 110, // kfk -> Deva - 1636, 10, // kfm -> Arab - 1640, 110, // kfp -> Deva - 1644, 110, // kfq -> Deva - 1648, 110, // kfr -> Deva - 1652, 110, // kfs -> Deva - 1656, 110, // kfu -> Deva - 1660, 110, // kfx -> Deva - 1664, 110, // kfy -> Deva - 1668, 110, // kgj -> Deva - 1672, 110, // kgy -> Deva - 1676, 515, // khb -> Talu - 1680, 550, // khf -> Thai - 1684, 555, // khg -> Tibt - 1688, 110, // khn -> Deva - 1692, 60, // kho -> Brah - 1696, 355, // kht -> Mymr - 1700, 105, // khv -> Cyrl - 1704, 10, // khw -> Arab - 1708, 110, // kif -> Deva - 1712, 105, // kim -> Cyrl - 1716, 110, // kip -> Deva - 1720, 260, // kjg -> Laoo - 1724, 105, // kjh -> Cyrl - 1728, 110, // kjl -> Deva - 1732, 110, // kjo -> Deva - 1736, 355, // kjp -> Mymr - 1740, 550, // kjt -> Thai - 1744, 555, // kjz -> Tibt - 1748, 105, // kk -> Cyrl - 1751, 10, // kk_AF -> Arab - 1757, 10, // kk_CN -> Arab - 1763, 10, // kk_IR -> Arab - 1769, 10, // kk_MN -> Arab - 1775, 555, // kkf -> Tibt - 1779, 255, // kkh -> Lana - 1783, 110, // kkt -> Deva - 1787, 110, // kle -> Deva - 1791, 10, // klj -> Arab - 1795, 110, // klr -> Deva - 1799, 235, // km -> Khmr - 1802, 110, // kmj -> Deva - 1806, 10, // kmz -> Arab - 1810, 245, // kn -> Knda - 1813, 110, // knn -> Deva - 1817, 250, // ko -> Kore - 1820, 105, // koi -> Cyrl - 1824, 110, // kok -> Deva - 1828, 105, // kpt -> Cyrl - 1832, 105, // kpy -> Cyrl - 1836, 495, // kqd -> Syrc - 1840, 125, // kqy -> Ethi - 1844, 110, // kra -> Deva - 1848, 105, // krc -> Cyrl - 1852, 105, // krk -> Cyrl - 1856, 235, // krr -> Khmr - 1860, 110, // kru -> Deva - 1864, 235, // krv -> Khmr - 1868, 10, // ks -> Arab - 1871, 355, // ksu -> Mymr - 1875, 355, // ksw -> Mymr - 1879, 110, // ksz -> Deva - 1883, 125, // ktb -> Ethi - 1887, 110, // kte -> Deva - 1891, 10, // ktl -> Arab - 1895, 425, // ktp -> Plrd - 1899, 10, // ku_LB -> Arab - 1905, 260, // kuf -> Laoo - 1909, 105, // kum -> Cyrl - 1913, 105, // kv -> Cyrl - 1916, 105, // kva -> Cyrl - 1920, 355, // kvq -> Mymr - 1924, 355, // kvt -> Mymr - 1928, 10, // kvx -> Arab - 1932, 220, // kvy -> Kali - 1936, 355, // kxf -> Mymr - 1940, 355, // kxk -> Mymr - 1944, 550, // kxm -> Thai - 1948, 10, // kxp -> Arab - 1952, 105, // ky -> Cyrl - 1955, 10, // ky_CN -> Arab - 1961, 220, // kyu -> Kali - 1965, 110, // kyv -> Deva - 1969, 110, // kyw -> Deva - 1973, 280, // lab -> Lina - 1977, 190, // lad -> Hebr - 1981, 110, // lae -> Deva - 1985, 10, // lah -> Arab - 1989, 105, // lbe -> Cyrl - 1993, 110, // lbf -> Deva - 1997, 555, // lbj -> Tibt - 2001, 110, // lbm -> Deva - 2005, 260, // lbo -> Laoo - 2009, 110, // lbr -> Deva - 2013, 550, // lcp -> Thai - 2017, 275, // lep -> Lepc - 2021, 105, // lez -> Cyrl - 2025, 110, // lhm -> Deva - 2029, 495, // lhs -> Syrc - 2033, 110, // lif -> Deva - 2037, 290, // lis -> Lisu - 2041, 555, // lkh -> Tibt - 2045, 10, // lki -> Arab - 2049, 110, // lmh -> Deva - 2053, 535, // lmn -> Telu - 2057, 260, // lo -> Laoo - 2060, 110, // loy -> Deva - 2064, 425, // lpo -> Plrd - 2068, 10, // lrc -> Arab - 2072, 10, // lrk -> Arab - 2076, 10, // lrl -> Arab - 2080, 10, // lsa -> Arab - 2084, 190, // lsd -> Hebr - 2088, 10, // lss -> Arab - 2092, 185, // ltc -> Hant - 2096, 555, // luk -> Tibt - 2100, 110, // luu -> Deva - 2104, 10, // luv -> Arab - 2108, 10, // luz -> Arab - 2112, 550, // lwl -> Thai - 2116, 550, // lwm -> Thai - 2120, 555, // lya -> Tibt - 2124, 180, // lzh -> Hans - 2128, 130, // lzz_GE -> Geor - 2135, 110, // mag -> Deva - 2139, 110, // mai -> Deva - 2143, 10, // mby -> Arab - 2147, 10, // mde -> Arab - 2151, 105, // mdf -> Cyrl - 2155, 125, // mdx -> Ethi - 2159, 125, // mdy -> Ethi - 2163, 10, // mfa -> Arab - 2167, 10, // mfi -> Arab - 2171, 270, // mga -> Latg - 2175, 110, // mgp -> Deva - 2179, 10, // mhj -> Arab - 2183, 305, // mid -> Mand - 2187, 110, // mjl -> Deva - 2191, 330, // mjq -> Mlym - 2195, 330, // mjr -> Mlym - 2199, 110, // mjt -> Deva - 2203, 535, // mju -> Telu - 2207, 330, // mjv -> Mlym - 2211, 110, // mjz -> Deva - 2215, 105, // mk -> Cyrl - 2218, 110, // mkb -> Deva - 2222, 110, // mke -> Deva - 2226, 10, // mki -> Arab - 2230, 550, // mkm -> Thai - 2234, 330, // ml -> Mlym - 2237, 550, // mlf -> Thai - 2241, 105, // mn -> Cyrl - 2244, 340, // mn_CN -> Mong - 2250, 340, // mnc -> Mong - 2254, 50, // mni -> Beng - 2258, 10, // mnj -> Arab - 2262, 105, // mns -> Cyrl - 2266, 355, // mnw -> Mymr - 2270, 550, // mpz -> Thai - 2274, 110, // mr -> Deva - 2277, 550, // mra -> Thai - 2281, 110, // mrd -> Deva - 2285, 105, // mrj -> Cyrl - 2289, 345, // mro -> Mroo - 2293, 110, // mrr -> Deva - 2297, 10, // ms_CC -> Arab - 2303, 105, // mtm -> Cyrl - 2307, 110, // mtr -> Deva - 2311, 105, // mud -> Cyrl - 2315, 555, // muk -> Tibt - 2319, 110, // mut -> Deva - 2323, 520, // muv -> Taml - 2327, 125, // muz -> Ethi - 2331, 10, // mve -> Arab - 2335, 340, // mvf -> Mong - 2339, 10, // mvy -> Arab - 2343, 125, // mvz -> Ethi - 2347, 110, // mwr -> Deva - 2351, 355, // mwt -> Mymr - 2355, 200, // mww -> Hmnp - 2359, 355, // my -> Mymr - 2362, 125, // mym -> Ethi - 2366, 105, // myv -> Cyrl - 2370, 305, // myz -> Mand - 2374, 10, // mzn -> Arab - 2378, 180, // nan -> Hans - 2382, 185, // nan_TW -> Hant - 2389, 110, // nao -> Deva - 2393, 110, // ncd -> Deva - 2397, 260, // ncq -> Laoo - 2401, 105, // ndf -> Cyrl - 2405, 110, // ne -> Deva - 2408, 105, // neg -> Cyrl - 2412, 555, // neh -> Tibt - 2416, 590, // nei -> Xsux - 2420, 110, // new -> Deva - 2424, 260, // ngt -> Laoo - 2428, 105, // nio -> Cyrl - 2432, 535, // nit -> Telu - 2436, 105, // niv -> Cyrl - 2440, 10, // nli -> Arab - 2444, 10, // nlm -> Arab - 2448, 110, // nlx -> Deva - 2452, 110, // nmm -> Deva - 2456, 580, // nnp -> Wcho - 2460, 255, // nod -> Lana - 2464, 110, // noe -> Deva - 2468, 105, // nog -> Cyrl - 2472, 110, // noi -> Deva - 2476, 445, // non -> Runr - 2480, 595, // nos -> Yiii - 2484, 555, // npb -> Tibt - 2488, 370, // nqo -> Nkoo - 2492, 445, // nrn -> Runr - 2496, 595, // nsd -> Yiii - 2500, 595, // nsf -> Yiii - 2504, 70, // nsk -> Cans - 2508, 560, // nst -> Tnsa - 2512, 595, // nsv -> Yiii - 2516, 595, // nty -> Yiii - 2520, 10, // ntz -> Arab - 2524, 365, // nwc -> Newa - 2528, 110, // nwx -> Deva - 2532, 550, // nyl -> Thai - 2536, 10, // nyq -> Arab - 2540, 550, // nyw -> Thai - 2544, 105, // oaa -> Cyrl - 2548, 105, // oac -> Cyrl - 2552, 495, // oar -> Syrc - 2556, 130, // oav -> Geor - 2560, 420, // obm -> Phnx - 2564, 355, // obr -> Mymr - 2568, 10, // odk -> Arab - 2572, 590, // oht -> Xsux - 2576, 70, // oj -> Cans - 2579, 70, // ojs -> Cans - 2583, 170, // okm -> Hang - 2587, 175, // oko -> Hani - 2591, 235, // okz -> Khmr - 2595, 110, // ola -> Deva - 2599, 555, // ole -> Tibt - 2603, 105, // omk -> Cyrl - 2607, 350, // omp -> Mtei - 2611, 335, // omr -> Modi - 2615, 355, // omx -> Mymr - 2619, 110, // oon -> Deva - 2623, 395, // or -> Orya - 2626, 535, // ort -> Telu - 2630, 10, // oru -> Arab - 2634, 105, // orv -> Cyrl - 2638, 105, // os -> Cyrl - 2641, 400, // osa -> Osge - 2645, 205, // osc -> Ital - 2649, 210, // osi -> Java - 2653, 10, // ota -> Arab - 2657, 555, // otb -> Tibt - 2661, 390, // otk -> Orkh - 2665, 150, // oty -> Gran - 2669, 405, // oui -> Ougr - 2673, 165, // pa -> Guru - 2676, 10, // pa_PK -> Arab - 2682, 415, // pal -> Phli - 2686, 105, // paq -> Cyrl - 2690, 10, // pbt -> Arab - 2694, 235, // pcb -> Khmr - 2698, 355, // pce -> Mymr - 2702, 330, // pcf -> Mlym - 2706, 330, // pcg -> Mlym - 2710, 110, // pch -> Deva - 2714, 110, // pci -> Deva - 2718, 535, // pcj -> Telu - 2722, 395, // peg -> Orya - 2726, 585, // peo -> Xpeo - 2730, 230, // pgd -> Khar - 2734, 110, // pgg -> Deva - 2738, 380, // pgl -> Ogam - 2742, 205, // pgn -> Ital - 2746, 110, // phd -> Deva - 2750, 355, // phk -> Mymr - 2754, 10, // phl -> Arab - 2758, 420, // phn -> Phnx - 2762, 260, // pho -> Laoo - 2766, 10, // phr -> Arab - 2770, 550, // pht -> Thai - 2774, 550, // phu -> Thai - 2778, 10, // phv -> Arab - 2782, 110, // phw -> Deva - 2786, 470, // pi -> Sinh - 2789, 60, // pka -> Brah - 2793, 330, // pkr -> Mlym - 2797, 10, // plk -> Arab - 2801, 355, // pll -> Mymr - 2805, 60, // pmh -> Brah - 2809, 155, // pnt -> Grek - 2813, 105, // pnt_RU -> Cyrl - 2820, 230, // pra -> Khar - 2824, 10, // prc -> Arab - 2828, 10, // prd -> Arab - 2832, 550, // prt -> Thai - 2836, 10, // prx -> Arab - 2840, 10, // ps -> Arab - 2843, 10, // psh -> Arab - 2847, 10, // psi -> Arab - 2851, 10, // pst -> Arab - 2855, 60, // psu -> Brah - 2859, 110, // pum -> Deva - 2863, 355, // pwo -> Mymr - 2867, 110, // pwr -> Deva - 2871, 550, // pww -> Thai - 2875, 355, // pyx -> Mymr - 2879, 10, // qxq -> Arab - 2883, 110, // raa -> Deva - 2887, 110, // rab -> Deva - 2891, 110, // raf -> Deva - 2895, 50, // rah -> Beng - 2899, 110, // raj -> Deva - 2903, 110, // rav -> Deva - 2907, 355, // rbb -> Mymr - 2911, 10, // rdb -> Arab - 2915, 395, // rei -> Orya - 2919, 440, // rhg -> Rohg - 2923, 110, // rji -> Deva - 2927, 110, // rjs -> Deva - 2931, 235, // rka -> Khmr - 2935, 355, // rki -> Mymr - 2939, 50, // rkt -> Beng - 2943, 20, // rmi -> Armn - 2947, 10, // rmt -> Arab - 2951, 355, // rmz -> Mymr - 2955, 105, // rsk -> Cyrl - 2959, 110, // rtw -> Deva - 2963, 105, // ru -> Cyrl - 2966, 105, // rue -> Cyrl - 2970, 105, // rut -> Cyrl - 2974, 110, // rwr -> Deva - 2978, 225, // ryu -> Kana - 2982, 110, // sa -> Deva - 2985, 105, // sah -> Cyrl - 2989, 450, // sam -> Samr - 2993, 385, // sat -> Olck - 2997, 460, // saz -> Saur - 3001, 10, // sbn -> Arab - 3005, 555, // sbu -> Tibt - 3009, 110, // sck -> Deva - 3013, 10, // scl -> Arab - 3017, 110, // scp -> Deva - 3021, 260, // sct -> Laoo - 3025, 505, // scu -> Takr - 3029, 155, // scx -> Grek - 3033, 10, // sd -> Arab - 3036, 110, // sd_IN -> Deva - 3042, 10, // sdb -> Arab - 3046, 10, // sdf -> Arab - 3050, 10, // sdg -> Arab - 3054, 10, // sdh -> Arab - 3058, 50, // sdr -> Beng - 3062, 10, // sds -> Arab - 3066, 105, // sel -> Cyrl - 3070, 425, // sfm -> Plrd - 3074, 105, // sgh -> Cyrl - 3078, 110, // sgj -> Deva - 3082, 10, // sgr -> Arab - 3086, 555, // sgt -> Tibt - 3090, 125, // sgw -> Ethi - 3094, 10, // sgy -> Arab - 3098, 10, // shd -> Arab - 3102, 540, // shi -> Tfng - 3106, 10, // shm -> Arab - 3110, 355, // shn -> Mymr - 3114, 10, // shu -> Arab - 3118, 10, // shv -> Arab - 3122, 470, // si -> Sinh - 3125, 105, // sia -> Cyrl - 3129, 555, // sip -> Tibt - 3133, 10, // siy -> Arab - 3137, 10, // siz -> Arab - 3141, 105, // sjd -> Cyrl - 3145, 110, // sjp -> Deva - 3149, 105, // sjt -> Cyrl - 3153, 550, // skb -> Thai - 3157, 110, // skj -> Deva - 3161, 10, // skr -> Arab - 3165, 595, // smh -> Yiii - 3169, 450, // smp -> Samr - 3173, 235, // smu -> Khmr - 3177, 10, // smy -> Arab - 3181, 530, // soa -> Tavt - 3185, 475, // sog -> Sogd - 3189, 110, // soi -> Deva - 3193, 550, // sou -> Thai - 3197, 555, // spt -> Tibt - 3201, 395, // spv -> Orya - 3205, 10, // sqo -> Arab - 3209, 260, // sqq -> Laoo - 3213, 10, // sqt -> Arab - 3217, 105, // sr -> Cyrl - 3220, 480, // srb -> Sora - 3224, 10, // srh -> Arab - 3228, 110, // srx -> Deva - 3232, 10, // srz -> Arab - 3236, 10, // ssh -> Arab - 3240, 260, // sss -> Laoo - 3244, 10, // sts -> Arab - 3248, 125, // stv -> Ethi - 3252, 105, // sty -> Cyrl - 3256, 490, // suz -> Sunu - 3260, 130, // sva -> Geor - 3264, 10, // swb -> Arab - 3268, 175, // swi -> Hani - 3272, 110, // swv -> Deva - 3276, 445, // sxu -> Runr - 3280, 495, // syc -> Syrc - 3284, 50, // syl -> Beng - 3288, 495, // syn -> Syrc - 3292, 495, // syr -> Syrc - 3296, 110, // syw -> Deva - 3300, 520, // ta -> Taml - 3303, 105, // tab -> Cyrl - 3307, 110, // taj -> Deva - 3311, 500, // tbk -> Tagb - 3315, 555, // tcn -> Tibt - 3319, 355, // tco -> Mymr - 3323, 520, // tcx -> Taml - 3327, 245, // tcy -> Knda - 3331, 540, // tda -> Tfng - 3335, 110, // tdb -> Deva - 3339, 510, // tdd -> Tale - 3343, 110, // tdg -> Deva - 3347, 110, // tdh -> Deva - 3351, 535, // te -> Telu - 3354, 210, // tes -> Java - 3358, 105, // tg -> Cyrl - 3361, 10, // tg_PK -> Arab - 3367, 110, // tge -> Deva - 3371, 555, // tgf -> Tibt - 3375, 550, // th -> Thai - 3378, 110, // the -> Deva - 3382, 110, // thf -> Deva - 3386, 510, // thi -> Tale - 3390, 110, // thl -> Deva - 3394, 550, // thm -> Thai - 3398, 110, // thq -> Deva - 3402, 110, // thr -> Deva - 3406, 110, // ths -> Deva - 3410, 125, // ti -> Ethi - 3413, 125, // tig -> Ethi - 3417, 110, // tij -> Deva - 3421, 105, // tin -> Cyrl - 3425, 355, // tjl -> Mymr - 3429, 10, // tjo -> Arab - 3433, 110, // tkb -> Deva - 3437, 10, // tks -> Arab - 3441, 110, // tkt -> Deva - 3445, 495, // tmr -> Syrc - 3449, 65, // tnv -> Cakm - 3453, 10, // tov -> Arab - 3457, 235, // tpu -> Khmr - 3461, 10, // tra -> Arab - 3465, 190, // trg -> Hebr - 3469, 10, // trm -> Arab - 3473, 10, // trw -> Arab - 3477, 155, // tsd -> Grek - 3481, 555, // tsj -> Tibt - 3485, 105, // tt -> Cyrl - 3488, 260, // tth -> Laoo - 3492, 260, // tto -> Laoo - 3496, 550, // tts -> Thai - 3500, 110, // ttz -> Deva - 3504, 355, // tvn -> Mymr - 3508, 110, // twm -> Deva - 3512, 525, // txg -> Tang - 3516, 565, // txo -> Toto - 3520, 530, // tyr -> Tavt - 3524, 105, // tyv -> Cyrl - 3528, 105, // ude -> Cyrl - 3532, 330, // udg -> Mlym - 3536, 105, // udi -> Cyrl - 3540, 105, // udm -> Cyrl - 3544, 10, // ug -> Arab - 3547, 105, // ug_KZ -> Cyrl - 3553, 105, // ug_MN -> Cyrl - 3559, 570, // uga -> Ugar - 3563, 105, // ugh -> Cyrl - 3567, 550, // ugo -> Thai - 3571, 105, // uk -> Cyrl - 3574, 395, // uki -> Orya - 3578, 105, // ulc -> Cyrl - 3582, 50, // unr -> Beng - 3586, 110, // unr_NP -> Deva - 3593, 50, // unx -> Beng - 3597, 10, // ur -> Arab - 3600, 550, // urk -> Thai - 3604, 10, // ush -> Arab - 3608, 155, // uum -> Grek - 3612, 10, // uz_AF -> Arab - 3618, 105, // uz_CN -> Cyrl - 3624, 10, // uzs -> Arab - 3628, 520, // vaa -> Taml - 3632, 10, // vaf -> Arab - 3636, 110, // vah -> Deva - 3640, 575, // vai -> Vaii - 3644, 110, // vas -> Deva - 3648, 110, // vav -> Deva - 3652, 110, // vay -> Deva - 3656, 10, // vgr -> Arab - 3660, 110, // vjk -> Deva - 3664, 245, // vmd -> Knda - 3668, 10, // vmh -> Arab - 3672, 125, // wal -> Ethi - 3676, 10, // wbk -> Arab - 3680, 535, // wbq -> Telu - 3684, 110, // wbr -> Deva - 3688, 125, // wle -> Ethi - 3692, 10, // wlo -> Arab - 3696, 110, // wme -> Deva - 3700, 10, // wne -> Arab - 3704, 10, // wni -> Arab - 3708, 135, // wsg -> Gong - 3712, 10, // wsv -> Arab - 3716, 110, // wtm -> Deva - 3720, 180, // wuu -> Hans - 3724, 0, // xag -> Aghb - 3728, 105, // xal -> Cyrl - 3732, 125, // xan -> Ethi - 3736, 105, // xas -> Cyrl - 3740, 90, // xco -> Chrs - 3744, 75, // xcr -> Cari - 3748, 105, // xdq -> Cyrl - 3752, 10, // xhe -> Arab - 3756, 235, // xhm -> Khmr - 3760, 395, // xis -> Orya - 3764, 10, // xka -> Arab - 3768, 10, // xkc -> Arab - 3772, 555, // xkf -> Tibt - 3776, 10, // xkj -> Arab - 3780, 10, // xkp -> Arab - 3784, 295, // xlc -> Lyci - 3788, 300, // xld -> Lydi - 3792, 120, // xly -> Elym - 3796, 130, // xmf -> Geor - 3800, 310, // xmn -> Mani - 3804, 325, // xmr -> Merc - 3808, 360, // xna -> Narb - 3812, 110, // xnr -> Deva - 3816, 155, // xpg -> Grek - 3820, 380, // xpi -> Ogam - 3824, 105, // xpm -> Cyrl - 3828, 430, // xpr -> Prti - 3832, 105, // xrm -> Cyrl - 3836, 105, // xrn -> Cyrl - 3840, 455, // xsa -> Sarb - 3844, 110, // xsr -> Deva - 3848, 60, // xtq -> Brah - 3852, 520, // xub -> Taml - 3856, 520, // xuj -> Taml - 3860, 205, // xve -> Ital - 3864, 10, // xvi -> Arab - 3868, 105, // xwo -> Cyrl - 3872, 315, // xzh -> Marc - 3876, 105, // yai -> Cyrl - 3880, 110, // ybh -> Deva - 3884, 110, // ybi -> Deva - 3888, 10, // ydg -> Arab - 3892, 330, // yea -> Mlym - 3896, 155, // yej -> Grek - 3900, 535, // yeu -> Telu - 3904, 425, // ygp -> Plrd - 3908, 190, // yhd -> Hebr - 3912, 190, // yi -> Hebr - 3915, 595, // yig -> Yiii - 3919, 190, // yih -> Hebr - 3923, 595, // yiv -> Yiii - 3927, 105, // ykg -> Cyrl - 3931, 105, // ykh -> Cyrl - 3935, 425, // yna -> Plrd - 3939, 105, // ynk -> Cyrl - 3943, 215, // yoi -> Jpan - 3947, 550, // yoy -> Thai - 3951, 105, // yrk -> Cyrl - 3955, 595, // ysd -> Yiii - 3959, 595, // ysn -> Yiii - 3963, 595, // ysp -> Yiii - 3967, 105, // ysr -> Cyrl - 3971, 425, // ysy -> Plrd - 3975, 190, // yud -> Hebr - 3979, 185, // yue -> Hant - 3983, 180, // yue_CN -> Hans - 3990, 105, // yug -> Cyrl - 3994, 105, // yux -> Cyrl - 3998, 425, // ywq -> Plrd - 4002, 425, // ywu -> Plrd - 4006, 555, // zau -> Tibt - 4010, 10, // zba -> Arab - 4014, 175, // zch -> Hani - 4018, 10, // zdj -> Arab - 4022, 175, // zeh -> Hani - 4026, 540, // zen -> Tfng - 4030, 175, // zgb -> Hani - 4034, 540, // zgh -> Tfng - 4038, 175, // zgm -> Hani - 4042, 175, // zgn -> Hani - 4046, 180, // zh -> Hans - 4049, 185, // zh_AU -> Hant - 4055, 185, // zh_BN -> Hant - 4061, 185, // zh_GB -> Hant - 4067, 185, // zh_GF -> Hant - 4073, 185, // zh_HK -> Hant - 4079, 185, // zh_ID -> Hant - 4085, 185, // zh_MO -> Hant - 4091, 185, // zh_PA -> Hant - 4097, 185, // zh_PF -> Hant - 4103, 185, // zh_PH -> Hant - 4109, 185, // zh_SR -> Hant - 4115, 185, // zh_TH -> Hant - 4121, 185, // zh_TW -> Hant - 4127, 185, // zh_US -> Hant - 4133, 185, // zh_VN -> Hant - 4139, 175, // zhd -> Hani - 4143, 375, // zhx -> Nshu - 4147, 105, // zko -> Cyrl - 4151, 240, // zkt -> Kits - 4155, 105, // zkz -> Cyrl - 4159, 175, // zlj -> Hani - 4163, 175, // zln -> Hani - 4167, 175, // zlq -> Hani - 4171, 175, // zqe -> Hani - 4175, 395, // zrg -> Orya - 4179, 190, // zrp -> Hebr - 4183, 10, // zum -> Arab - 4187, 125, // zwa -> Ethi - 4191, 175, // zyg -> Hani - 4195, 175, // zyn -> Hani - 4199, 175, // zzj -> Hani + 19, 425, // abl -> Rjng + 23, 100, // abq -> Cyrl + 27, 10, // abv -> Arab + 31, 10, // acm -> Arab + 35, 10, // acq -> Arab + 39, 10, // acw -> Arab + 43, 10, // acx -> Arab + 47, 10, // adf -> Arab + 51, 545, // adx -> Tibt + 55, 100, // ady -> Cyrl + 59, 25, // ae -> Avst + 62, 10, // aeb -> Arab + 66, 10, // aec -> Arab + 70, 10, // aee -> Arab + 74, 10, // aeq -> Arab + 78, 10, // afb -> Arab + 82, 105, // agi -> Deva + 86, 120, // agj -> Ethi + 90, 100, // agx -> Cyrl + 94, 120, // ahg -> Ethi + 98, 5, // aho -> Ahom + 102, 105, // ahr -> Deva + 106, 10, // aib -> Arab + 110, 485, // aii -> Syrc + 114, 185, // aij -> Hebr + 118, 220, // ain -> Kana + 122, 350, // aio -> Mymr + 126, 10, // aiq -> Arab + 130, 580, // akk -> Xsux + 134, 100, // akv -> Cyrl + 138, 255, // alk -> Laoo + 142, 325, // all -> Mlym + 146, 100, // alr -> Cyrl + 150, 100, // alt -> Cyrl + 154, 120, // alw -> Ethi + 158, 120, // am -> Ethi + 161, 210, // ams -> Jpan + 165, 485, // amw -> Syrc + 169, 100, // ani -> Cyrl + 173, 105, // anp -> Deva + 177, 105, // anq -> Deva + 181, 105, // anr -> Deva + 185, 120, // anu -> Ethi + 189, 45, // aot -> Beng + 193, 10, // apc -> Arab + 197, 10, // apd -> Arab + 201, 105, // aph -> Deva + 205, 100, // aqc -> Cyrl + 209, 10, // ar -> Arab + 212, 15, // arc -> Armi + 216, 10, // arq -> Arab + 220, 10, // ars -> Arab + 224, 10, // ary -> Arab + 228, 10, // arz -> Arab + 232, 45, // as -> Beng + 235, 455, // ase -> Sgnw + 239, 10, // ask -> Arab + 243, 105, // asr -> Deva + 247, 10, // atn -> Arab + 251, 100, // atv -> Cyrl + 255, 10, // auj -> Arab + 259, 10, // auz -> Arab + 263, 100, // av -> Cyrl + 266, 10, // avd -> Arab + 270, 10, // avl -> Arab + 274, 105, // awa -> Deva + 278, 120, // awn -> Ethi + 282, 20, // axm -> Armn + 286, 10, // ayh -> Arab + 290, 10, // ayl -> Arab + 294, 10, // ayn -> Arab + 298, 10, // ayp -> Arab + 302, 10, // az_IQ -> Arab + 308, 10, // az_IR -> Arab + 314, 100, // az_RU -> Cyrl + 320, 10, // azb -> Arab + 324, 100, // ba -> Cyrl + 327, 10, // bal -> Arab + 331, 105, // bap -> Deva + 335, 35, // bax -> Bamu + 339, 125, // bbl -> Geor + 343, 120, // bcq -> Ethi + 347, 385, // bdv -> Orya + 351, 10, // bdz -> Arab + 355, 100, // be -> Cyrl + 358, 105, // bee -> Deva + 362, 10, // bej -> Arab + 366, 105, // bfb -> Deva + 370, 510, // bfq -> Taml + 374, 10, // bft -> Arab + 378, 545, // bfu -> Tibt + 382, 385, // bfw -> Orya + 386, 105, // bfy -> Deva + 390, 105, // bfz -> Deva + 394, 100, // bg -> Cyrl + 397, 105, // bgc -> Deva + 401, 105, // bgd -> Deva + 405, 10, // bgn -> Arab + 409, 10, // bgp -> Arab + 413, 105, // bgq -> Deva + 417, 105, // bgw -> Deva + 421, 150, // bgx -> Grek + 425, 105, // bha -> Deva + 429, 105, // bhb -> Deva + 433, 105, // bhd -> Deva + 437, 10, // bhe -> Arab + 441, 100, // bhh -> Cyrl + 445, 105, // bhi -> Deva + 449, 105, // bhj -> Deva + 453, 10, // bhm -> Arab + 457, 485, // bhn -> Syrc + 461, 105, // bho -> Deva + 465, 105, // bht -> Deva + 469, 105, // bhu -> Deva + 473, 105, // bix -> Deva + 477, 105, // biy -> Deva + 481, 485, // bjf -> Syrc + 485, 105, // bjj -> Deva + 489, 10, // bjm -> Arab + 493, 545, // bkk -> Tibt + 497, 350, // blk -> Mymr + 501, 520, // blt -> Tavt + 505, 105, // bmj -> Deva + 509, 45, // bn -> Beng + 512, 105, // bns -> Deva + 516, 545, // bo -> Tibt + 519, 100, // bph -> Cyrl + 523, 105, // bpx -> Deva + 527, 45, // bpy -> Beng + 531, 10, // bqi -> Arab + 535, 105, // bra -> Deva + 539, 230, // brb -> Khmr + 543, 105, // brd -> Deva + 547, 10, // brh -> Arab + 551, 10, // brk -> Arab + 555, 545, // bro -> Tibt + 559, 255, // brv -> Laoo + 563, 240, // brw -> Knda + 567, 105, // brx -> Deva + 571, 10, // bsh -> Arab + 575, 10, // bsk -> Arab + 579, 120, // bst -> Ethi + 583, 40, // btd -> Batk + 587, 40, // btm -> Batk + 591, 105, // btv -> Deva + 595, 100, // bua -> Cyrl + 599, 350, // bwe -> Mymr + 603, 100, // bxm -> Cyrl + 607, 335, // bxu -> Mong + 611, 105, // byh -> Deva + 615, 120, // byn -> Ethi + 619, 105, // byw -> Deva + 623, 540, // bzi -> Thai + 627, 540, // cbn -> Thai + 631, 60, // ccp -> Cakm + 635, 525, // cde -> Telu + 639, 105, // cdh -> Deva + 643, 155, // cdi -> Gujr + 647, 105, // cdj -> Deva + 651, 105, // cdm -> Deva + 655, 105, // cdn -> Deva + 659, 175, // cdo -> Hans + 663, 45, // cdz -> Beng + 667, 100, // ce -> Cyrl + 670, 545, // cgk -> Tibt + 674, 10, // chg -> Arab + 678, 100, // chm -> Cyrl + 682, 80, // chr -> Cher + 686, 105, // chx -> Deva + 690, 105, // cih -> Deva + 694, 10, // cja -> Arab + 698, 100, // cji -> Cyrl + 702, 75, // cjm -> Cham + 706, 175, // cjy -> Hans + 710, 10, // ckb -> Arab + 714, 100, // ckt -> Cyrl + 718, 10, // clh -> Arab + 722, 100, // clw -> Cyrl + 726, 480, // cmg -> Soyo + 730, 545, // cna -> Tibt + 734, 175, // cnp -> Hans + 738, 540, // cog -> Thai + 742, 90, // cop -> Copt + 746, 150, // cpg -> Grek + 750, 65, // cr -> Cans + 753, 100, // crh -> Cyrl + 757, 65, // crj -> Cans + 761, 65, // crk -> Cans + 765, 65, // crl -> Cans + 769, 65, // crm -> Cans + 773, 350, // csh -> Mymr + 777, 175, // csp -> Hans + 781, 65, // csw -> Cans + 785, 400, // ctd -> Pauc + 789, 45, // ctg -> Beng + 793, 105, // ctn -> Deva + 797, 510, // ctt -> Taml + 801, 510, // cty -> Taml + 805, 100, // cu -> Cyrl + 808, 250, // cuu -> Lana + 812, 100, // cv -> Cyrl + 815, 175, // czh -> Hans + 819, 185, // czk -> Hebr + 823, 105, // daq -> Deva + 827, 100, // dar -> Cyrl + 831, 10, // dcc -> Arab + 835, 100, // ddo -> Cyrl + 839, 10, // def -> Arab + 843, 10, // deh -> Arab + 847, 45, // der -> Beng + 851, 10, // dgl -> Arab + 855, 105, // dhi -> Deva + 859, 155, // dhn -> Gujr + 863, 155, // dho -> Gujr + 867, 105, // dhw -> Deva + 871, 545, // dka -> Tibt + 875, 100, // dlg -> Cyrl + 879, 315, // dmf -> Medf + 883, 10, // dmk -> Arab + 887, 10, // dml -> Arab + 891, 100, // dng -> Cyrl + 895, 350, // dnu -> Mymr + 899, 350, // dnv -> Mymr + 903, 105, // doi -> Deva + 907, 120, // dox -> Ethi + 911, 545, // dre -> Tibt + 915, 105, // drq -> Deva + 919, 120, // drs -> Ethi + 923, 105, // dry -> Deva + 927, 385, // dso -> Orya + 931, 105, // dty -> Deva + 935, 155, // dub -> Gujr + 939, 105, // duh -> Deva + 943, 105, // dus -> Deva + 947, 535, // dv -> Thaa + 950, 385, // dwk -> Orya + 954, 105, // dwz -> Deva + 958, 545, // dz -> Tibt + 961, 545, // dzl -> Tibt + 965, 150, // ecr -> Grek + 969, 95, // ecy -> Cprt + 973, 110, // egy -> Egyp + 977, 215, // eky -> Kali + 981, 150, // el -> Grek + 984, 105, // emg -> Deva + 988, 105, // emu -> Deva + 992, 100, // enf -> Cyrl + 996, 100, // enh -> Cyrl + 1000, 510, // era -> Taml + 1004, 135, // esg -> Gonm + 1008, 10, // esh -> Arab + 1012, 200, // ett -> Ital + 1016, 100, // eve -> Cyrl + 1020, 100, // evn -> Cyrl + 1024, 10, // fa -> Arab + 1027, 10, // fay -> Arab + 1031, 10, // faz -> Arab + 1035, 10, // fia -> Arab + 1039, 105, // fmu -> Deva + 1043, 10, // fub -> Arab + 1047, 175, // gan -> Hans + 1051, 385, // gaq -> Orya + 1055, 155, // gas -> Gujr + 1059, 525, // gau -> Telu + 1063, 385, // gbj -> Orya + 1067, 105, // gbk -> Deva + 1071, 155, // gbl -> Gujr + 1075, 105, // gbm -> Deva + 1079, 10, // gbz -> Arab + 1083, 385, // gdb -> Orya + 1087, 100, // gdo -> Cyrl + 1091, 105, // gdx -> Deva + 1095, 120, // gez -> Ethi + 1099, 10, // ggg -> Arab + 1103, 10, // gha -> Arab + 1107, 105, // ghe -> Deva + 1111, 530, // gho -> Tfng + 1115, 10, // ghr -> Arab + 1119, 545, // ght -> Tibt + 1123, 10, // gig -> Arab + 1127, 100, // gin -> Cyrl + 1131, 10, // gjk -> Arab + 1135, 10, // gju -> Arab + 1139, 100, // gld -> Cyrl + 1143, 10, // glh -> Arab + 1147, 10, // glk -> Arab + 1151, 260, // gml -> Latf + 1155, 120, // gmv -> Ethi + 1159, 280, // gmy -> Linb + 1163, 545, // goe -> Tibt + 1167, 120, // gof -> Ethi + 1171, 105, // goj -> Deva + 1175, 105, // gok -> Deva + 1179, 105, // gon -> Deva + 1183, 140, // got -> Goth + 1187, 105, // gra -> Deva + 1191, 150, // grc -> Grek + 1195, 10, // grr -> Arab + 1199, 45, // grt -> Beng + 1203, 120, // gru -> Ethi + 1207, 155, // gu -> Gujr + 1210, 105, // gvr -> Deva + 1214, 10, // gwc -> Arab + 1218, 10, // gwf -> Arab + 1222, 10, // gwt -> Arab + 1226, 105, // gyo -> Deva + 1230, 10, // gzi -> Arab + 1234, 10, // ha_CM -> Arab + 1240, 10, // ha_SD -> Arab + 1246, 10, // hac -> Arab + 1250, 175, // hak -> Hans + 1254, 180, // hak_TW -> Hant + 1261, 120, // har -> Ethi + 1265, 10, // haz -> Arab + 1269, 185, // hbo -> Hebr + 1273, 120, // hdy -> Ethi + 1277, 185, // he -> Hebr + 1280, 105, // hi -> Deva + 1283, 105, // hif -> Deva + 1287, 495, // hii -> Takr + 1291, 580, // hit -> Xsux + 1295, 10, // hkh -> Arab + 1299, 105, // hlb -> Deva + 1303, 190, // hlu -> Hluw + 1307, 415, // hmd -> Plrd + 1311, 50, // hmj -> Bopo + 1315, 50, // hmq -> Bopo + 1319, 10, // hnd -> Arab + 1323, 105, // hne -> Deva + 1327, 195, // hnj -> Hmnp + 1331, 175, // hnm -> Hans + 1335, 10, // hno -> Arab + 1339, 105, // hoc -> Deva + 1343, 10, // hoh -> Arab + 1347, 105, // hoj -> Deva + 1351, 170, // how -> Hani + 1355, 105, // hoy -> Deva + 1359, 350, // hpo -> Mymr + 1363, 485, // hrt -> Syrc + 1367, 10, // hrz -> Arab + 1371, 175, // hsn -> Hans + 1375, 10, // hss -> Arab + 1379, 580, // htx -> Xsux + 1383, 105, // hut -> Deva + 1387, 185, // huy -> Hebr + 1391, 100, // huz -> Cyrl + 1395, 20, // hy -> Armn + 1398, 20, // hyw -> Armn + 1402, 585, // ii -> Yiii + 1405, 290, // imy -> Lyci + 1409, 100, // inh -> Cyrl + 1413, 350, // int -> Mymr + 1417, 120, // ior -> Ethi + 1421, 510, // iru -> Taml + 1425, 10, // isk -> Arab + 1429, 185, // itk -> Hebr + 1433, 100, // itl -> Cyrl + 1437, 65, // iu -> Cans + 1440, 185, // iw -> Hebr + 1443, 210, // ja -> Jpan + 1446, 10, // jad -> Arab + 1450, 10, // jat -> Arab + 1454, 185, // jbe -> Hebr + 1458, 10, // jbn -> Arab + 1462, 100, // jct -> Cyrl + 1466, 545, // jda -> Tibt + 1470, 10, // jdg -> Arab + 1474, 100, // jdt -> Cyrl + 1478, 105, // jee -> Deva + 1482, 125, // jge -> Geor + 1486, 185, // ji -> Hebr + 1489, 165, // jje -> Hang + 1493, 350, // jkm -> Mymr + 1497, 105, // jml -> Deva + 1501, 495, // jna -> Takr + 1505, 10, // jnd -> Arab + 1509, 105, // jnl -> Deva + 1513, 105, // jns -> Deva + 1517, 10, // jog -> Arab + 1521, 185, // jpa -> Hebr + 1525, 185, // jpr -> Hebr + 1529, 185, // jrb -> Hebr + 1533, 105, // jul -> Deva + 1537, 385, // jun -> Orya + 1541, 385, // juy -> Orya + 1545, 545, // jya -> Tibt + 1549, 185, // jye -> Hebr + 1553, 125, // ka -> Geor + 1556, 100, // kaa -> Cyrl + 1560, 100, // kap -> Cyrl + 1564, 30, // kaw -> Bali + 1568, 100, // kbd -> Cyrl + 1572, 545, // kbg -> Tibt + 1576, 10, // kbu -> Arab + 1580, 10, // kby -> Arab + 1584, 100, // kca -> Cyrl + 1588, 10, // kcy -> Arab + 1592, 45, // kdq -> Beng + 1596, 540, // kdt -> Thai + 1600, 100, // ket -> Cyrl + 1604, 325, // kev -> Mlym + 1608, 105, // kex -> Deva + 1612, 525, // key -> Telu + 1616, 240, // kfa -> Knda + 1620, 105, // kfb -> Deva + 1624, 525, // kfc -> Telu + 1628, 240, // kfd -> Knda + 1632, 510, // kfe -> Taml + 1636, 240, // kfg -> Knda + 1640, 325, // kfh -> Mlym + 1644, 510, // kfi -> Taml + 1648, 105, // kfk -> Deva + 1652, 10, // kfm -> Arab + 1656, 105, // kfp -> Deva + 1660, 105, // kfq -> Deva + 1664, 105, // kfr -> Deva + 1668, 105, // kfs -> Deva + 1672, 105, // kfu -> Deva + 1676, 105, // kfx -> Deva + 1680, 105, // kfy -> Deva + 1684, 105, // kgj -> Deva + 1688, 545, // kgy -> Tibt + 1692, 505, // khb -> Talu + 1696, 540, // khf -> Thai + 1700, 545, // khg -> Tibt + 1704, 105, // khn -> Deva + 1708, 55, // kho -> Brah + 1712, 350, // kht -> Mymr + 1716, 100, // khv -> Cyrl + 1720, 10, // khw -> Arab + 1724, 105, // kif -> Deva + 1728, 100, // kim -> Cyrl + 1732, 105, // kip -> Deva + 1736, 255, // kjg -> Laoo + 1740, 100, // kjh -> Cyrl + 1744, 105, // kjl -> Deva + 1748, 105, // kjo -> Deva + 1752, 350, // kjp -> Mymr + 1756, 540, // kjt -> Thai + 1760, 545, // kjz -> Tibt + 1764, 100, // kk -> Cyrl + 1767, 10, // kk_AF -> Arab + 1773, 10, // kk_CN -> Arab + 1779, 10, // kk_IR -> Arab + 1785, 10, // kk_MN -> Arab + 1791, 545, // kkf -> Tibt + 1795, 250, // kkh -> Lana + 1799, 105, // kkt -> Deva + 1803, 105, // kle -> Deva + 1807, 10, // klj -> Arab + 1811, 105, // klr -> Deva + 1815, 230, // km -> Khmr + 1818, 105, // kmj -> Deva + 1822, 10, // kmz -> Arab + 1826, 240, // kn -> Knda + 1829, 105, // knn -> Deva + 1833, 245, // ko -> Kore + 1836, 100, // koi -> Cyrl + 1840, 105, // kok -> Deva + 1844, 100, // kpt -> Cyrl + 1848, 100, // kpy -> Cyrl + 1852, 485, // kqd -> Syrc + 1856, 120, // kqy -> Ethi + 1860, 105, // kra -> Deva + 1864, 100, // krc -> Cyrl + 1868, 100, // krk -> Cyrl + 1872, 230, // krr -> Khmr + 1876, 105, // kru -> Deva + 1880, 230, // krv -> Khmr + 1884, 10, // ks -> Arab + 1887, 350, // ksu -> Mymr + 1891, 350, // ksw -> Mymr + 1895, 105, // ksz -> Deva + 1899, 120, // ktb -> Ethi + 1903, 105, // kte -> Deva + 1907, 10, // ktl -> Arab + 1911, 415, // ktp -> Plrd + 1915, 100, // ku_AM -> Cyrl + 1921, 100, // ku_AZ -> Cyrl + 1927, 100, // ku_GE -> Cyrl + 1933, 10, // ku_IQ -> Arab + 1939, 10, // ku_IR -> Arab + 1945, 10, // ku_LB -> Arab + 1951, 100, // ku_TM -> Cyrl + 1957, 255, // kuf -> Laoo + 1961, 100, // kum -> Cyrl + 1965, 100, // kv -> Cyrl + 1968, 100, // kva -> Cyrl + 1972, 350, // kvq -> Mymr + 1976, 350, // kvt -> Mymr + 1980, 10, // kvx -> Arab + 1984, 215, // kvy -> Kali + 1988, 105, // kwx -> Deva + 1992, 350, // kxf -> Mymr + 1996, 350, // kxk -> Mymr + 2000, 540, // kxm -> Thai + 2004, 10, // kxp -> Arab + 2008, 100, // ky -> Cyrl + 2011, 10, // ky_CN -> Arab + 2017, 215, // kyu -> Kali + 2021, 105, // kyv -> Deva + 2025, 105, // kyw -> Deva + 2029, 275, // lab -> Lina + 2033, 185, // lad -> Hebr + 2037, 105, // lae -> Deva + 2041, 10, // lah -> Arab + 2045, 100, // lbe -> Cyrl + 2049, 105, // lbf -> Deva + 2053, 545, // lbj -> Tibt + 2057, 105, // lbm -> Deva + 2061, 255, // lbo -> Laoo + 2065, 105, // lbr -> Deva + 2069, 540, // lcp -> Thai + 2073, 270, // lep -> Lepc + 2077, 100, // lez -> Cyrl + 2081, 105, // lhm -> Deva + 2085, 485, // lhs -> Syrc + 2089, 105, // lif -> Deva + 2093, 285, // lis -> Lisu + 2097, 545, // lkh -> Tibt + 2101, 10, // lki -> Arab + 2105, 105, // lmh -> Deva + 2109, 525, // lmn -> Telu + 2113, 255, // lo -> Laoo + 2116, 105, // loy -> Deva + 2120, 415, // lpo -> Plrd + 2124, 10, // lrc -> Arab + 2128, 10, // lrk -> Arab + 2132, 10, // lrl -> Arab + 2136, 10, // lsa -> Arab + 2140, 185, // lsd -> Hebr + 2144, 10, // lss -> Arab + 2148, 180, // ltc -> Hant + 2152, 175, // luh -> Hans + 2156, 545, // luk -> Tibt + 2160, 105, // luu -> Deva + 2164, 10, // luv -> Arab + 2168, 10, // luz -> Arab + 2172, 540, // lwl -> Thai + 2176, 540, // lwm -> Thai + 2180, 545, // lya -> Tibt + 2184, 180, // lzh -> Hant + 2188, 125, // lzz_GE -> Geor + 2195, 105, // mag -> Deva + 2199, 105, // mai -> Deva + 2203, 10, // mby -> Arab + 2207, 10, // mde -> Arab + 2211, 100, // mdf -> Cyrl + 2215, 120, // mdx -> Ethi + 2219, 120, // mdy -> Ethi + 2223, 10, // mey -> Arab + 2227, 10, // mfa -> Arab + 2231, 10, // mfi -> Arab + 2235, 265, // mga -> Latg + 2239, 105, // mgp -> Deva + 2243, 10, // mhj -> Arab + 2247, 300, // mid -> Mand + 2251, 105, // mjl -> Deva + 2255, 325, // mjq -> Mlym + 2259, 325, // mjr -> Mlym + 2263, 105, // mjt -> Deva + 2267, 525, // mju -> Telu + 2271, 325, // mjv -> Mlym + 2275, 105, // mjz -> Deva + 2279, 100, // mk -> Cyrl + 2282, 105, // mkb -> Deva + 2286, 105, // mke -> Deva + 2290, 10, // mki -> Arab + 2294, 540, // mkm -> Thai + 2298, 325, // ml -> Mlym + 2301, 540, // mlf -> Thai + 2305, 100, // mn -> Cyrl + 2308, 335, // mn_CN -> Mong + 2314, 335, // mnc -> Mong + 2318, 45, // mni -> Beng + 2322, 10, // mnj -> Arab + 2326, 100, // mns -> Cyrl + 2330, 350, // mnw -> Mymr + 2334, 540, // mpz -> Thai + 2338, 105, // mr -> Deva + 2341, 540, // mra -> Thai + 2345, 105, // mrd -> Deva + 2349, 100, // mrj -> Cyrl + 2353, 340, // mro -> Mroo + 2357, 105, // mrr -> Deva + 2361, 10, // ms_CC -> Arab + 2367, 100, // mtm -> Cyrl + 2371, 105, // mtr -> Deva + 2375, 100, // mud -> Cyrl + 2379, 545, // muk -> Tibt + 2383, 105, // mut -> Deva + 2387, 510, // muv -> Taml + 2391, 120, // muz -> Ethi + 2395, 10, // mve -> Arab + 2399, 335, // mvf -> Mong + 2403, 10, // mvy -> Arab + 2407, 120, // mvz -> Ethi + 2411, 105, // mwr -> Deva + 2415, 350, // mwt -> Mymr + 2419, 195, // mww -> Hmnp + 2423, 350, // my -> Mymr + 2426, 120, // mym -> Ethi + 2430, 100, // myv -> Cyrl + 2434, 300, // myz -> Mand + 2438, 10, // mzb -> Arab + 2442, 10, // mzn -> Arab + 2446, 175, // nan -> Hans + 2450, 180, // nan_MO -> Hant + 2457, 180, // nan_TW -> Hant + 2464, 105, // nao -> Deva + 2468, 105, // ncd -> Deva + 2472, 255, // ncq -> Laoo + 2476, 100, // ndf -> Cyrl + 2480, 105, // ne -> Deva + 2483, 100, // neg -> Cyrl + 2487, 545, // neh -> Tibt + 2491, 580, // nei -> Xsux + 2495, 105, // new -> Deva + 2499, 255, // ngt -> Laoo + 2503, 100, // nio -> Cyrl + 2507, 525, // nit -> Telu + 2511, 100, // niv -> Cyrl + 2515, 10, // nli -> Arab + 2519, 10, // nlm -> Arab + 2523, 105, // nlx -> Deva + 2527, 105, // nmm -> Deva + 2531, 570, // nnp -> Wcho + 2535, 250, // nod -> Lana + 2539, 105, // noe -> Deva + 2543, 100, // nog -> Cyrl + 2547, 105, // noi -> Deva + 2551, 435, // non -> Runr + 2555, 585, // nos -> Yiii + 2559, 545, // npb -> Tibt + 2563, 365, // nqo -> Nkoo + 2567, 435, // nrn -> Runr + 2571, 585, // nsd -> Yiii + 2575, 585, // nsf -> Yiii + 2579, 65, // nsk -> Cans + 2583, 550, // nst -> Tnsa + 2587, 585, // nsv -> Yiii + 2591, 585, // nty -> Yiii + 2595, 10, // ntz -> Arab + 2599, 360, // nwc -> Newa + 2603, 105, // nwx -> Deva + 2607, 540, // nyl -> Thai + 2611, 10, // nyq -> Arab + 2615, 540, // nyw -> Thai + 2619, 100, // oaa -> Cyrl + 2623, 100, // oac -> Cyrl + 2627, 485, // oar -> Syrc + 2631, 125, // oav -> Geor + 2635, 410, // obm -> Phnx + 2639, 350, // obr -> Mymr + 2643, 10, // odk -> Arab + 2647, 580, // oht -> Xsux + 2651, 65, // oj -> Cans + 2654, 65, // ojs -> Cans + 2658, 165, // okm -> Hang + 2662, 170, // oko -> Hani + 2666, 230, // okz -> Khmr + 2670, 105, // ola -> Deva + 2674, 545, // ole -> Tibt + 2678, 100, // omk -> Cyrl + 2682, 345, // omp -> Mtei + 2686, 330, // omr -> Modi + 2690, 350, // omx -> Mymr + 2694, 105, // oon -> Deva + 2698, 385, // or -> Orya + 2701, 525, // ort -> Telu + 2705, 10, // oru -> Arab + 2709, 100, // orv -> Cyrl + 2713, 100, // os -> Cyrl + 2716, 390, // osa -> Osge + 2720, 200, // osc -> Ital + 2724, 205, // osi -> Java + 2728, 10, // ota -> Arab + 2732, 545, // otb -> Tibt + 2736, 380, // otk -> Orkh + 2740, 145, // oty -> Gran + 2744, 395, // oui -> Ougr + 2748, 255, // oyb -> Laoo + 2752, 160, // pa -> Guru + 2755, 10, // pa_PK -> Arab + 2761, 405, // pal -> Phli + 2765, 100, // paq -> Cyrl + 2769, 10, // pbt -> Arab + 2773, 230, // pcb -> Khmr + 2777, 350, // pce -> Mymr + 2781, 325, // pcf -> Mlym + 2785, 325, // pcg -> Mlym + 2789, 105, // pch -> Deva + 2793, 105, // pci -> Deva + 2797, 525, // pcj -> Telu + 2801, 385, // peg -> Orya + 2805, 575, // peo -> Xpeo + 2809, 225, // pgd -> Khar + 2813, 105, // pgg -> Deva + 2817, 370, // pgl -> Ogam + 2821, 200, // pgn -> Ital + 2825, 105, // phd -> Deva + 2829, 350, // phk -> Mymr + 2833, 10, // phl -> Arab + 2837, 410, // phn -> Phnx + 2841, 255, // pho -> Laoo + 2845, 10, // phr -> Arab + 2849, 540, // pht -> Thai + 2853, 540, // phu -> Thai + 2857, 10, // phv -> Arab + 2861, 105, // phw -> Deva + 2865, 105, // pi_IN -> Deva + 2871, 465, // pi_LK -> Sinh + 2877, 350, // pi_MM -> Mymr + 2883, 540, // pi_TH -> Thai + 2889, 55, // pka -> Brah + 2893, 325, // pkr -> Mlym + 2897, 10, // plk -> Arab + 2901, 350, // pll -> Mymr + 2905, 55, // pmh -> Brah + 2909, 150, // pnt -> Grek + 2913, 100, // pnt_RU -> Cyrl + 2920, 10, // prc -> Arab + 2924, 10, // prd -> Arab + 2928, 540, // prt -> Thai + 2932, 10, // prx -> Arab + 2936, 10, // ps -> Arab + 2939, 10, // psh -> Arab + 2943, 10, // psi -> Arab + 2947, 10, // pst -> Arab + 2951, 55, // psu -> Brah + 2955, 105, // pum -> Deva + 2959, 350, // pwo -> Mymr + 2963, 105, // pwr -> Deva + 2967, 540, // pww -> Thai + 2971, 350, // pyx -> Mymr + 2975, 10, // qxq -> Arab + 2979, 105, // raa -> Deva + 2983, 105, // rab -> Deva + 2987, 105, // raf -> Deva + 2991, 45, // rah -> Beng + 2995, 105, // raj -> Deva + 2999, 105, // rav -> Deva + 3003, 350, // rbb -> Mymr + 3007, 10, // rdb -> Arab + 3011, 385, // rei -> Orya + 3015, 430, // rhg -> Rohg + 3019, 105, // rji -> Deva + 3023, 105, // rjs -> Deva + 3027, 230, // rka -> Khmr + 3031, 350, // rki -> Mymr + 3035, 45, // rkt -> Beng + 3039, 20, // rmi -> Armn + 3043, 10, // rmt -> Arab + 3047, 350, // rmz -> Mymr + 3051, 100, // rsk -> Cyrl + 3055, 105, // rtw -> Deva + 3059, 100, // ru -> Cyrl + 3062, 100, // rue -> Cyrl + 3066, 100, // rut -> Cyrl + 3070, 105, // rwr -> Deva + 3074, 220, // ryu -> Kana + 3078, 105, // sa -> Deva + 3081, 100, // sah -> Cyrl + 3085, 440, // sam -> Samr + 3089, 375, // sat -> Olck + 3093, 450, // saz -> Saur + 3097, 10, // sbn -> Arab + 3101, 545, // sbu -> Tibt + 3105, 105, // sck -> Deva + 3109, 10, // scl -> Arab + 3113, 105, // scp -> Deva + 3117, 255, // sct -> Laoo + 3121, 495, // scu -> Takr + 3125, 150, // scx -> Grek + 3129, 10, // sd -> Arab + 3132, 105, // sd_IN -> Deva + 3138, 10, // sdb -> Arab + 3142, 10, // sdf -> Arab + 3146, 10, // sdg -> Arab + 3150, 10, // sdh -> Arab + 3154, 45, // sdr -> Beng + 3158, 10, // sds -> Arab + 3162, 100, // sel -> Cyrl + 3166, 415, // sfm -> Plrd + 3170, 100, // sgh -> Cyrl + 3174, 105, // sgj -> Deva + 3178, 10, // sgr -> Arab + 3182, 545, // sgt -> Tibt + 3186, 120, // sgw -> Ethi + 3190, 10, // sgy -> Arab + 3194, 10, // shd -> Arab + 3198, 530, // shi -> Tfng + 3202, 10, // shm -> Arab + 3206, 350, // shn -> Mymr + 3210, 10, // shu -> Arab + 3214, 10, // shv -> Arab + 3218, 465, // si -> Sinh + 3221, 100, // sia -> Cyrl + 3225, 545, // sip -> Tibt + 3229, 10, // siy -> Arab + 3233, 10, // siz -> Arab + 3237, 175, // sjc -> Hans + 3241, 100, // sjd -> Cyrl + 3245, 105, // sjp -> Deva + 3249, 100, // sjt -> Cyrl + 3253, 540, // skb -> Thai + 3257, 105, // skj -> Deva + 3261, 10, // skr -> Arab + 3265, 585, // smh -> Yiii + 3269, 440, // smp -> Samr + 3273, 230, // smu -> Khmr + 3277, 10, // smy -> Arab + 3281, 520, // soa -> Tavt + 3285, 470, // sog -> Sogd + 3289, 105, // soi -> Deva + 3293, 540, // sou -> Thai + 3297, 545, // spt -> Tibt + 3301, 385, // spv -> Orya + 3305, 10, // sqo -> Arab + 3309, 255, // sqq -> Laoo + 3313, 10, // sqt -> Arab + 3317, 100, // sr -> Cyrl + 3320, 475, // srb -> Sora + 3324, 10, // srh -> Arab + 3328, 105, // srx -> Deva + 3332, 10, // srz -> Arab + 3336, 10, // ssh -> Arab + 3340, 255, // sss -> Laoo + 3344, 10, // sts -> Arab + 3348, 250, // stu -> Lana + 3352, 500, // stu_CN -> Tale + 3359, 120, // stv -> Ethi + 3363, 100, // sty -> Cyrl + 3367, 105, // suz -> Deva + 3371, 125, // sva -> Geor + 3375, 10, // swb -> Arab + 3379, 170, // swi -> Hani + 3383, 105, // swv -> Deva + 3387, 435, // sxu -> Runr + 3391, 485, // syc -> Syrc + 3395, 45, // syl -> Beng + 3399, 485, // syn -> Syrc + 3403, 485, // syr -> Syrc + 3407, 105, // syw -> Deva + 3411, 510, // ta -> Taml + 3414, 100, // tab -> Cyrl + 3418, 105, // taj -> Deva + 3422, 490, // tbk -> Tagb + 3426, 105, // tcn -> Deva + 3430, 350, // tco -> Mymr + 3434, 510, // tcx -> Taml + 3438, 240, // tcy -> Knda + 3442, 530, // tda -> Tfng + 3446, 105, // tdb -> Deva + 3450, 500, // tdd -> Tale + 3454, 105, // tdg -> Deva + 3458, 105, // tdh -> Deva + 3462, 525, // te -> Telu + 3465, 205, // tes -> Java + 3469, 100, // tg -> Cyrl + 3472, 10, // tg_PK -> Arab + 3478, 105, // tge -> Deva + 3482, 545, // tgf -> Tibt + 3486, 540, // th -> Thai + 3489, 105, // the -> Deva + 3493, 105, // thf -> Deva + 3497, 500, // thi -> Tale + 3501, 105, // thl -> Deva + 3505, 540, // thm -> Thai + 3509, 105, // thq -> Deva + 3513, 105, // thr -> Deva + 3517, 105, // ths -> Deva + 3521, 120, // ti -> Ethi + 3524, 120, // tig -> Ethi + 3528, 105, // tij -> Deva + 3532, 100, // tin -> Cyrl + 3536, 350, // tjl -> Mymr + 3540, 10, // tjo -> Arab + 3544, 105, // tkb -> Deva + 3548, 10, // tks -> Arab + 3552, 105, // tkt -> Deva + 3556, 485, // tmr -> Syrc + 3560, 60, // tnv -> Cakm + 3564, 10, // tov -> Arab + 3568, 230, // tpu -> Khmr + 3572, 10, // tra -> Arab + 3576, 185, // trg -> Hebr + 3580, 10, // trm -> Arab + 3584, 10, // trw -> Arab + 3588, 150, // tsd -> Grek + 3592, 545, // tsj -> Tibt + 3596, 100, // tt -> Cyrl + 3599, 255, // tth -> Laoo + 3603, 255, // tto -> Laoo + 3607, 540, // tts -> Thai + 3611, 105, // ttz -> Deva + 3615, 350, // tvn -> Mymr + 3619, 545, // twm -> Tibt + 3623, 515, // txg -> Tang + 3627, 555, // txo -> Toto + 3631, 520, // tyr -> Tavt + 3635, 100, // tyv -> Cyrl + 3639, 100, // ude -> Cyrl + 3643, 325, // udg -> Mlym + 3647, 100, // udi -> Cyrl + 3651, 100, // udm -> Cyrl + 3655, 10, // ug -> Arab + 3658, 100, // ug_KZ -> Cyrl + 3664, 100, // ug_MN -> Cyrl + 3670, 560, // uga -> Ugar + 3674, 100, // ugh -> Cyrl + 3678, 540, // ugo -> Thai + 3682, 100, // uk -> Cyrl + 3685, 385, // uki -> Orya + 3689, 100, // ulc -> Cyrl + 3693, 45, // unr -> Beng + 3697, 105, // unr_NP -> Deva + 3704, 45, // unx -> Beng + 3708, 10, // ur -> Arab + 3711, 540, // urk -> Thai + 3715, 10, // ush -> Arab + 3719, 150, // uum -> Grek + 3723, 10, // uz_AF -> Arab + 3729, 100, // uz_CN -> Cyrl + 3735, 10, // uzs -> Arab + 3739, 510, // vaa -> Taml + 3743, 10, // vaf -> Arab + 3747, 105, // vah -> Deva + 3751, 565, // vai -> Vaii + 3755, 105, // vas -> Deva + 3759, 105, // vav -> Deva + 3763, 105, // vay -> Deva + 3767, 10, // vgr -> Arab + 3771, 105, // vjk -> Deva + 3775, 240, // vmd -> Knda + 3779, 10, // vmh -> Arab + 3783, 120, // wal -> Ethi + 3787, 10, // wbk -> Arab + 3791, 525, // wbq -> Telu + 3795, 105, // wbr -> Deva + 3799, 120, // wle -> Ethi + 3803, 10, // wlo -> Arab + 3807, 105, // wme -> Deva + 3811, 10, // wne -> Arab + 3815, 10, // wni -> Arab + 3819, 130, // wsg -> Gong + 3823, 10, // wsv -> Arab + 3827, 105, // wtm -> Deva + 3831, 175, // wuu -> Hans + 3835, 0, // xag -> Aghb + 3839, 100, // xal -> Cyrl + 3843, 120, // xan -> Ethi + 3847, 100, // xas -> Cyrl + 3851, 85, // xco -> Chrs + 3855, 70, // xcr -> Cari + 3859, 100, // xdq -> Cyrl + 3863, 10, // xhe -> Arab + 3867, 230, // xhm -> Khmr + 3871, 385, // xis -> Orya + 3875, 10, // xka -> Arab + 3879, 10, // xkc -> Arab + 3883, 545, // xkf -> Tibt + 3887, 10, // xkj -> Arab + 3891, 10, // xkp -> Arab + 3895, 290, // xlc -> Lyci + 3899, 295, // xld -> Lydi + 3903, 115, // xly -> Elym + 3907, 125, // xmf -> Geor + 3911, 305, // xmn -> Mani + 3915, 320, // xmr -> Merc + 3919, 355, // xna -> Narb + 3923, 105, // xnr -> Deva + 3927, 150, // xpg -> Grek + 3931, 370, // xpi -> Ogam + 3935, 100, // xpm -> Cyrl + 3939, 420, // xpr -> Prti + 3943, 100, // xrm -> Cyrl + 3947, 100, // xrn -> Cyrl + 3951, 445, // xsa -> Sarb + 3955, 460, // xsd -> Sidt + 3959, 105, // xsr -> Deva + 3963, 55, // xtq -> Brah + 3967, 510, // xub -> Taml + 3971, 510, // xuj -> Taml + 3975, 200, // xve -> Ital + 3979, 10, // xvi -> Arab + 3983, 100, // xwo -> Cyrl + 3987, 310, // xzh -> Marc + 3991, 100, // yai -> Cyrl + 3995, 105, // ybh -> Deva + 3999, 105, // ybi -> Deva + 4003, 10, // ydg -> Arab + 4007, 325, // yea -> Mlym + 4011, 150, // yej -> Grek + 4015, 525, // yeu -> Telu + 4019, 415, // ygp -> Plrd + 4023, 185, // yhd -> Hebr + 4027, 185, // yi -> Hebr + 4030, 585, // yig -> Yiii + 4034, 185, // yih -> Hebr + 4038, 585, // yiv -> Yiii + 4042, 100, // ykg -> Cyrl + 4046, 100, // ykh -> Cyrl + 4050, 415, // yna -> Plrd + 4054, 100, // ynk -> Cyrl + 4058, 210, // yoi -> Jpan + 4062, 540, // yoy -> Thai + 4066, 100, // yrk -> Cyrl + 4070, 585, // ysd -> Yiii + 4074, 585, // ysn -> Yiii + 4078, 585, // ysp -> Yiii + 4082, 100, // ysr -> Cyrl + 4086, 415, // ysy -> Plrd + 4090, 185, // yud -> Hebr + 4094, 180, // yue -> Hant + 4098, 175, // yue_CN -> Hans + 4105, 100, // yug -> Cyrl + 4109, 100, // yux -> Cyrl + 4113, 415, // ywq -> Plrd + 4117, 415, // ywu -> Plrd + 4121, 545, // zau -> Tibt + 4125, 10, // zba -> Arab + 4129, 170, // zch -> Hani + 4133, 10, // zdj -> Arab + 4137, 170, // zeh -> Hani + 4141, 530, // zen -> Tfng + 4145, 170, // zgb -> Hani + 4149, 530, // zgh -> Tfng + 4153, 170, // zgm -> Hani + 4157, 170, // zgn -> Hani + 4161, 175, // zh -> Hans + 4164, 180, // zh_AU -> Hant + 4170, 180, // zh_BN -> Hant + 4176, 180, // zh_GB -> Hant + 4182, 180, // zh_GF -> Hant + 4188, 180, // zh_HK -> Hant + 4194, 180, // zh_ID -> Hant + 4200, 180, // zh_MO -> Hant + 4206, 180, // zh_PA -> Hant + 4212, 180, // zh_PF -> Hant + 4218, 180, // zh_PH -> Hant + 4224, 180, // zh_SR -> Hant + 4230, 180, // zh_TH -> Hant + 4236, 180, // zh_TW -> Hant + 4242, 180, // zh_US -> Hant + 4248, 180, // zh_VN -> Hant + 4254, 170, // zhd -> Hani + 4258, 100, // zko -> Cyrl + 4262, 235, // zkt -> Kits + 4266, 100, // zkz -> Cyrl + 4270, 170, // zlj -> Hani + 4274, 170, // zln -> Hani + 4278, 170, // zlq -> Hani + 4282, 170, // zqe -> Hani + 4286, 385, // zrg -> Orya + 4290, 185, // zrp -> Hebr + 4294, 10, // zum -> Arab + 4298, 120, // zwa -> Ethi + 4302, 170, // zyg -> Hani + 4306, 170, // zyn -> Hani + 4310, 170, // zzj -> Hani }; //====================================================================== @@ -1163,38 +1185,39 @@ const char parentLocaleChars[] = "cu_Glag\0dje_Arab\0dyo_Arab\0en_001\0en_150\0en_AG\0en_AI\0en_AT\0" "en_AU\0en_BB\0en_BE\0en_BM\0en_BS\0en_BW\0en_BZ\0en_CC\0en_CH\0" "en_CK\0en_CM\0en_CX\0en_CY\0en_CZ\0en_DE\0en_DG\0en_DK\0en_DM\0" - "en_Dsrt\0en_ER\0en_ES\0en_FI\0en_FJ\0en_FK\0en_FM\0en_FR\0en_GB\0" - "en_GD\0en_GG\0en_GH\0en_GI\0en_GM\0en_GS\0en_GY\0en_HK\0en_HU\0" - "en_ID\0en_IE\0en_IL\0en_IM\0en_IN\0en_IO\0en_IT\0en_JE\0en_JM\0" - "en_KE\0en_KI\0en_KN\0en_KY\0en_LC\0en_LR\0en_LS\0en_MG\0en_MO\0" - "en_MS\0en_MT\0en_MU\0en_MV\0en_MW\0en_MY\0en_NA\0en_NF\0en_NG\0" - "en_NL\0en_NO\0en_NR\0en_NU\0en_NZ\0en_PG\0en_PK\0en_PL\0en_PN\0" - "en_PT\0en_PW\0en_RO\0en_RW\0en_SB\0en_SC\0en_SD\0en_SE\0en_SG\0" - "en_SH\0en_SI\0en_SK\0en_SL\0en_SS\0en_SX\0en_SZ\0en_Shaw\0en_TC\0" - "en_TK\0en_TO\0en_TT\0en_TV\0en_TZ\0en_UG\0en_VC\0en_VG\0en_VU\0" - "en_WS\0en_ZA\0en_ZM\0en_ZW\0es_419\0es_AR\0es_BO\0es_BR\0es_BZ\0" - "es_CL\0es_CO\0es_CR\0es_CU\0es_DO\0es_EC\0es_GT\0es_HN\0es_JP\0" - "es_MX\0es_NI\0es_PA\0es_PE\0es_PR\0es_PY\0es_SV\0es_US\0es_UY\0" - "es_VE\0ff_Adlm\0ff_Arab\0fr_HT\0ha_Arab\0hi_Latn\0ht\0iu_Latn\0" - "kaa_Latn\0kk_Arab\0kok_Latn\0ks_Deva\0ku_Arab\0kxv_Deva\0kxv_Orya\0" - "kxv_Telu\0ky_Arab\0ky_Latn\0ml_Arab\0mn_Mong\0mni_Mtei\0ms_Arab\0" - "nb\0nn\0no\0no_NO\0pa_Arab\0pt_AO\0pt_CH\0pt_CV\0pt_FR\0pt_GQ\0" - "pt_GW\0pt_LU\0pt_MO\0pt_MZ\0pt_PT\0pt_ST\0pt_TL\0root\0sat_Deva\0" - "sd_Deva\0sd_Khoj\0sd_Sind\0shi_Latn\0so_Arab\0sr_Latn\0sw_Arab\0" - "tg_Arab\0ug_Cyrl\0uz_Arab\0uz_Cyrl\0vai_Latn\0wo_Arab\0yo_Arab\0" - "yue_Hans\0zh_Hant\0zh_Hant_HK\0zh_Hant_MO\0"; + "en_Dsrt\0en_EE\0en_ER\0en_ES\0en_FI\0en_FJ\0en_FK\0en_FM\0en_FR\0" + "en_GB\0en_GD\0en_GE\0en_GG\0en_GH\0en_GI\0en_GM\0en_GS\0en_GY\0" + "en_HK\0en_HU\0en_ID\0en_IE\0en_IL\0en_IM\0en_IN\0en_IO\0en_IT\0" + "en_JE\0en_JM\0en_KE\0en_KI\0en_KN\0en_KY\0en_LC\0en_LR\0en_LS\0" + "en_LT\0en_LV\0en_MG\0en_MO\0en_MS\0en_MT\0en_MU\0en_MV\0en_MW\0" + "en_MY\0en_NA\0en_NF\0en_NG\0en_NL\0en_NO\0en_NR\0en_NU\0en_NZ\0" + "en_PG\0en_PK\0en_PL\0en_PN\0en_PT\0en_PW\0en_RO\0en_RW\0en_SB\0" + "en_SC\0en_SD\0en_SE\0en_SG\0en_SH\0en_SI\0en_SK\0en_SL\0en_SS\0" + "en_SX\0en_SZ\0en_Shaw\0en_TC\0en_TK\0en_TO\0en_TT\0en_TV\0en_TZ\0" + "en_UA\0en_UG\0en_VC\0en_VG\0en_VU\0en_WS\0en_ZA\0en_ZM\0en_ZW\0" + "es_419\0es_AR\0es_BO\0es_BR\0es_BZ\0es_CL\0es_CO\0es_CR\0es_CU\0" + "es_DO\0es_EC\0es_GT\0es_HN\0es_JP\0es_MX\0es_NI\0es_PA\0es_PE\0" + "es_PR\0es_PY\0es_SV\0es_US\0es_UY\0es_VE\0ff_Adlm\0ff_Arab\0fr_HT\0" + "ha_Arab\0hi_Latn\0ht\0iu_Latn\0kaa_Latn\0kk_Arab\0kok_Latn\0ks_Deva\0" + "ku_Arab\0kxv_Deva\0kxv_Orya\0kxv_Telu\0ky_Arab\0ky_Latn\0ml_Arab\0" + "mn_Mong\0mni_Mtei\0ms_Arab\0nb\0nn\0no\0no_NO\0pa_Arab\0pt_AO\0" + "pt_CH\0pt_CV\0pt_FR\0pt_GQ\0pt_GW\0pt_LU\0pt_MO\0pt_MZ\0pt_PT\0" + "pt_ST\0pt_TL\0root\0sat_Deva\0sd_Deva\0sd_Khoj\0sd_Sind\0shi_Latn\0" + "so_Arab\0sr_Latn\0suz_Sunu\0sw_Arab\0tg_Arab\0ug_Cyrl\0uz_Arab\0" + "uz_Cyrl\0vai_Latn\0wo_Arab\0yo_Arab\0yue_Hans\0zh_Hant\0zh_Hant_HK\0" + "zh_Hant_MO\0"; const int32_t parentLocaleTable[] = { - 0, 1146, // az_Arab -> root - 8, 1146, // az_Cyrl -> root - 16, 1146, // bal_Latn -> root - 25, 1146, // blt_Latn -> root - 34, 1146, // bm_Nkoo -> root - 42, 1146, // bs_Cyrl -> root - 50, 1146, // byn_Latn -> root - 59, 1146, // cu_Glag -> root - 67, 1146, // dje_Arab -> root - 76, 1146, // dyo_Arab -> root + 0, 1176, // az_Arab -> root + 8, 1176, // az_Cyrl -> root + 16, 1176, // bal_Latn -> root + 25, 1176, // blt_Latn -> root + 34, 1176, // bm_Nkoo -> root + 42, 1176, // bs_Cyrl -> root + 50, 1176, // byn_Latn -> root + 59, 1176, // cu_Glag -> root + 67, 1176, // dje_Arab -> root + 76, 1176, // dyo_Arab -> root 92, 85, // en_150 -> en_001 99, 85, // en_AG -> en_001 105, 85, // en_AI -> en_001 @@ -1217,167 +1240,173 @@ const int32_t parentLocaleTable[] = { 207, 85, // en_DG -> en_001 213, 92, // en_DK -> en_150 219, 85, // en_DM -> en_001 - 225, 1146, // en_Dsrt -> root - 233, 85, // en_ER -> en_001 - 239, 92, // en_ES -> en_150 - 245, 92, // en_FI -> en_150 - 251, 85, // en_FJ -> en_001 - 257, 85, // en_FK -> en_001 - 263, 85, // en_FM -> en_001 - 269, 92, // en_FR -> en_150 - 275, 85, // en_GB -> en_001 - 281, 85, // en_GD -> en_001 - 287, 85, // en_GG -> en_001 - 293, 85, // en_GH -> en_001 - 299, 85, // en_GI -> en_001 - 305, 85, // en_GM -> en_001 - 311, 85, // en_GS -> en_001 - 317, 85, // en_GY -> en_001 - 323, 85, // en_HK -> en_001 - 329, 92, // en_HU -> en_150 - 335, 85, // en_ID -> en_001 - 341, 85, // en_IE -> en_001 - 347, 85, // en_IL -> en_001 - 353, 85, // en_IM -> en_001 - 359, 85, // en_IN -> en_001 - 365, 85, // en_IO -> en_001 - 371, 92, // en_IT -> en_150 - 377, 85, // en_JE -> en_001 - 383, 85, // en_JM -> en_001 - 389, 85, // en_KE -> en_001 - 395, 85, // en_KI -> en_001 - 401, 85, // en_KN -> en_001 - 407, 85, // en_KY -> en_001 - 413, 85, // en_LC -> en_001 - 419, 85, // en_LR -> en_001 - 425, 85, // en_LS -> en_001 - 431, 85, // en_MG -> en_001 - 437, 85, // en_MO -> en_001 - 443, 85, // en_MS -> en_001 - 449, 85, // en_MT -> en_001 - 455, 85, // en_MU -> en_001 - 461, 85, // en_MV -> en_001 - 467, 85, // en_MW -> en_001 - 473, 85, // en_MY -> en_001 - 479, 85, // en_NA -> en_001 - 485, 85, // en_NF -> en_001 - 491, 85, // en_NG -> en_001 - 497, 92, // en_NL -> en_150 - 503, 92, // en_NO -> en_150 - 509, 85, // en_NR -> en_001 - 515, 85, // en_NU -> en_001 - 521, 85, // en_NZ -> en_001 - 527, 85, // en_PG -> en_001 - 533, 85, // en_PK -> en_001 - 539, 92, // en_PL -> en_150 - 545, 85, // en_PN -> en_001 - 551, 92, // en_PT -> en_150 - 557, 85, // en_PW -> en_001 - 563, 92, // en_RO -> en_150 - 569, 85, // en_RW -> en_001 - 575, 85, // en_SB -> en_001 - 581, 85, // en_SC -> en_001 - 587, 85, // en_SD -> en_001 - 593, 92, // en_SE -> en_150 - 599, 85, // en_SG -> en_001 - 605, 85, // en_SH -> en_001 - 611, 92, // en_SI -> en_150 - 617, 92, // en_SK -> en_150 - 623, 85, // en_SL -> en_001 - 629, 85, // en_SS -> en_001 - 635, 85, // en_SX -> en_001 - 641, 85, // en_SZ -> en_001 - 647, 1146, // en_Shaw -> root - 655, 85, // en_TC -> en_001 - 661, 85, // en_TK -> en_001 - 667, 85, // en_TO -> en_001 - 673, 85, // en_TT -> en_001 - 679, 85, // en_TV -> en_001 - 685, 85, // en_TZ -> en_001 - 691, 85, // en_UG -> en_001 - 697, 85, // en_VC -> en_001 - 703, 85, // en_VG -> en_001 - 709, 85, // en_VU -> en_001 - 715, 85, // en_WS -> en_001 - 721, 85, // en_ZA -> en_001 - 727, 85, // en_ZM -> en_001 - 733, 85, // en_ZW -> en_001 - 746, 739, // es_AR -> es_419 - 752, 739, // es_BO -> es_419 - 758, 739, // es_BR -> es_419 - 764, 739, // es_BZ -> es_419 - 770, 739, // es_CL -> es_419 - 776, 739, // es_CO -> es_419 - 782, 739, // es_CR -> es_419 - 788, 739, // es_CU -> es_419 - 794, 739, // es_DO -> es_419 - 800, 739, // es_EC -> es_419 - 806, 739, // es_GT -> es_419 - 812, 739, // es_HN -> es_419 - 818, 739, // es_JP -> es_419 - 824, 739, // es_MX -> es_419 - 830, 739, // es_NI -> es_419 - 836, 739, // es_PA -> es_419 - 842, 739, // es_PE -> es_419 - 848, 739, // es_PR -> es_419 - 854, 739, // es_PY -> es_419 - 860, 739, // es_SV -> es_419 - 866, 739, // es_US -> es_419 - 872, 739, // es_UY -> es_419 - 878, 739, // es_VE -> es_419 - 884, 1146, // ff_Adlm -> root - 892, 1146, // ff_Arab -> root - 906, 1146, // ha_Arab -> root - 914, 359, // hi_Latn -> en_IN - 922, 900, // ht -> fr_HT - 925, 1146, // iu_Latn -> root - 933, 1146, // kaa_Latn -> root - 942, 1146, // kk_Arab -> root - 950, 1146, // kok_Latn -> root - 959, 1146, // ks_Deva -> root - 967, 1146, // ku_Arab -> root - 975, 1146, // kxv_Deva -> root - 984, 1146, // kxv_Orya -> root - 993, 1146, // kxv_Telu -> root - 1002, 1146, // ky_Arab -> root - 1010, 1146, // ky_Latn -> root - 1018, 1146, // ml_Arab -> root - 1026, 1146, // mn_Mong -> root - 1034, 1146, // mni_Mtei -> root - 1043, 1146, // ms_Arab -> root - 1051, 1057, // nb -> no - 1054, 1057, // nn -> no - 1060, 1057, // no_NO -> no - 1066, 1146, // pa_Arab -> root - 1074, 1128, // pt_AO -> pt_PT - 1080, 1128, // pt_CH -> pt_PT - 1086, 1128, // pt_CV -> pt_PT - 1092, 1128, // pt_FR -> pt_PT - 1098, 1128, // pt_GQ -> pt_PT - 1104, 1128, // pt_GW -> pt_PT - 1110, 1128, // pt_LU -> pt_PT - 1116, 1128, // pt_MO -> pt_PT - 1122, 1128, // pt_MZ -> pt_PT - 1134, 1128, // pt_ST -> pt_PT - 1140, 1128, // pt_TL -> pt_PT - 1151, 1146, // sat_Deva -> root - 1160, 1146, // sd_Deva -> root - 1168, 1146, // sd_Khoj -> root - 1176, 1146, // sd_Sind -> root - 1184, 1146, // shi_Latn -> root - 1193, 1146, // so_Arab -> root - 1201, 1146, // sr_Latn -> root - 1209, 1146, // sw_Arab -> root - 1217, 1146, // tg_Arab -> root - 1225, 1146, // ug_Cyrl -> root - 1233, 1146, // uz_Arab -> root - 1241, 1146, // uz_Cyrl -> root - 1249, 1146, // vai_Latn -> root - 1258, 1146, // wo_Arab -> root - 1266, 1146, // yo_Arab -> root - 1274, 1146, // yue_Hans -> root - 1283, 1146, // zh_Hant -> root - 1302, 1291, // zh_Hant_MO -> zh_Hant_HK + 225, 1176, // en_Dsrt -> root + 233, 92, // en_EE -> en_150 + 239, 85, // en_ER -> en_001 + 245, 92, // en_ES -> en_150 + 251, 92, // en_FI -> en_150 + 257, 85, // en_FJ -> en_001 + 263, 85, // en_FK -> en_001 + 269, 85, // en_FM -> en_001 + 275, 92, // en_FR -> en_150 + 281, 85, // en_GB -> en_001 + 287, 85, // en_GD -> en_001 + 293, 92, // en_GE -> en_150 + 299, 85, // en_GG -> en_001 + 305, 85, // en_GH -> en_001 + 311, 85, // en_GI -> en_001 + 317, 85, // en_GM -> en_001 + 323, 85, // en_GS -> en_001 + 329, 85, // en_GY -> en_001 + 335, 85, // en_HK -> en_001 + 341, 92, // en_HU -> en_150 + 347, 85, // en_ID -> en_001 + 353, 85, // en_IE -> en_001 + 359, 85, // en_IL -> en_001 + 365, 85, // en_IM -> en_001 + 371, 85, // en_IN -> en_001 + 377, 85, // en_IO -> en_001 + 383, 92, // en_IT -> en_150 + 389, 85, // en_JE -> en_001 + 395, 85, // en_JM -> en_001 + 401, 85, // en_KE -> en_001 + 407, 85, // en_KI -> en_001 + 413, 85, // en_KN -> en_001 + 419, 85, // en_KY -> en_001 + 425, 85, // en_LC -> en_001 + 431, 85, // en_LR -> en_001 + 437, 85, // en_LS -> en_001 + 443, 92, // en_LT -> en_150 + 449, 92, // en_LV -> en_150 + 455, 85, // en_MG -> en_001 + 461, 85, // en_MO -> en_001 + 467, 85, // en_MS -> en_001 + 473, 85, // en_MT -> en_001 + 479, 85, // en_MU -> en_001 + 485, 85, // en_MV -> en_001 + 491, 85, // en_MW -> en_001 + 497, 85, // en_MY -> en_001 + 503, 85, // en_NA -> en_001 + 509, 85, // en_NF -> en_001 + 515, 85, // en_NG -> en_001 + 521, 92, // en_NL -> en_150 + 527, 92, // en_NO -> en_150 + 533, 85, // en_NR -> en_001 + 539, 85, // en_NU -> en_001 + 545, 85, // en_NZ -> en_001 + 551, 85, // en_PG -> en_001 + 557, 85, // en_PK -> en_001 + 563, 92, // en_PL -> en_150 + 569, 85, // en_PN -> en_001 + 575, 92, // en_PT -> en_150 + 581, 85, // en_PW -> en_001 + 587, 92, // en_RO -> en_150 + 593, 85, // en_RW -> en_001 + 599, 85, // en_SB -> en_001 + 605, 85, // en_SC -> en_001 + 611, 85, // en_SD -> en_001 + 617, 92, // en_SE -> en_150 + 623, 85, // en_SG -> en_001 + 629, 85, // en_SH -> en_001 + 635, 92, // en_SI -> en_150 + 641, 92, // en_SK -> en_150 + 647, 85, // en_SL -> en_001 + 653, 85, // en_SS -> en_001 + 659, 85, // en_SX -> en_001 + 665, 85, // en_SZ -> en_001 + 671, 1176, // en_Shaw -> root + 679, 85, // en_TC -> en_001 + 685, 85, // en_TK -> en_001 + 691, 85, // en_TO -> en_001 + 697, 85, // en_TT -> en_001 + 703, 85, // en_TV -> en_001 + 709, 85, // en_TZ -> en_001 + 715, 92, // en_UA -> en_150 + 721, 85, // en_UG -> en_001 + 727, 85, // en_VC -> en_001 + 733, 85, // en_VG -> en_001 + 739, 85, // en_VU -> en_001 + 745, 85, // en_WS -> en_001 + 751, 85, // en_ZA -> en_001 + 757, 85, // en_ZM -> en_001 + 763, 85, // en_ZW -> en_001 + 776, 769, // es_AR -> es_419 + 782, 769, // es_BO -> es_419 + 788, 769, // es_BR -> es_419 + 794, 769, // es_BZ -> es_419 + 800, 769, // es_CL -> es_419 + 806, 769, // es_CO -> es_419 + 812, 769, // es_CR -> es_419 + 818, 769, // es_CU -> es_419 + 824, 769, // es_DO -> es_419 + 830, 769, // es_EC -> es_419 + 836, 769, // es_GT -> es_419 + 842, 769, // es_HN -> es_419 + 848, 769, // es_JP -> es_419 + 854, 769, // es_MX -> es_419 + 860, 769, // es_NI -> es_419 + 866, 769, // es_PA -> es_419 + 872, 769, // es_PE -> es_419 + 878, 769, // es_PR -> es_419 + 884, 769, // es_PY -> es_419 + 890, 769, // es_SV -> es_419 + 896, 769, // es_US -> es_419 + 902, 769, // es_UY -> es_419 + 908, 769, // es_VE -> es_419 + 914, 1176, // ff_Adlm -> root + 922, 1176, // ff_Arab -> root + 936, 1176, // ha_Arab -> root + 944, 371, // hi_Latn -> en_IN + 952, 930, // ht -> fr_HT + 955, 1176, // iu_Latn -> root + 963, 1176, // kaa_Latn -> root + 972, 1176, // kk_Arab -> root + 980, 1176, // kok_Latn -> root + 989, 1176, // ks_Deva -> root + 997, 1176, // ku_Arab -> root + 1005, 1176, // kxv_Deva -> root + 1014, 1176, // kxv_Orya -> root + 1023, 1176, // kxv_Telu -> root + 1032, 1176, // ky_Arab -> root + 1040, 1176, // ky_Latn -> root + 1048, 1176, // ml_Arab -> root + 1056, 1176, // mn_Mong -> root + 1064, 1176, // mni_Mtei -> root + 1073, 1176, // ms_Arab -> root + 1081, 1087, // nb -> no + 1084, 1087, // nn -> no + 1090, 1087, // no_NO -> no + 1096, 1176, // pa_Arab -> root + 1104, 1158, // pt_AO -> pt_PT + 1110, 1158, // pt_CH -> pt_PT + 1116, 1158, // pt_CV -> pt_PT + 1122, 1158, // pt_FR -> pt_PT + 1128, 1158, // pt_GQ -> pt_PT + 1134, 1158, // pt_GW -> pt_PT + 1140, 1158, // pt_LU -> pt_PT + 1146, 1158, // pt_MO -> pt_PT + 1152, 1158, // pt_MZ -> pt_PT + 1164, 1158, // pt_ST -> pt_PT + 1170, 1158, // pt_TL -> pt_PT + 1181, 1176, // sat_Deva -> root + 1190, 1176, // sd_Deva -> root + 1198, 1176, // sd_Khoj -> root + 1206, 1176, // sd_Sind -> root + 1214, 1176, // shi_Latn -> root + 1223, 1176, // so_Arab -> root + 1231, 1176, // sr_Latn -> root + 1239, 1176, // suz_Sunu -> root + 1248, 1176, // sw_Arab -> root + 1256, 1176, // tg_Arab -> root + 1264, 1176, // ug_Cyrl -> root + 1272, 1176, // uz_Arab -> root + 1280, 1176, // uz_Cyrl -> root + 1288, 1176, // vai_Latn -> root + 1297, 1176, // wo_Arab -> root + 1305, 1176, // yo_Arab -> root + 1313, 1176, // yue_Hans -> root + 1322, 1176, // zh_Hant -> root + 1341, 1330, // zh_Hant_MO -> zh_Hant_HK }; diff --git a/deps/icu-small/source/common/locbased.cpp b/deps/icu-small/source/common/locbased.cpp index 6f35e72210fef6..b661cc46278591 100644 --- a/deps/icu-small/source/common/locbased.cpp +++ b/deps/icu-small/source/common/locbased.cpp @@ -11,85 +11,36 @@ ********************************************************************** */ #include "locbased.h" -#include "cstring.h" -#include "charstr.h" +#include "uresimp.h" U_NAMESPACE_BEGIN -Locale LocaleBased::getLocale(const CharString* valid, const CharString* actual, - ULocDataLocaleType type, UErrorCode& status) { - const char* id = getLocaleID(valid, actual, type, status); - return Locale(id != nullptr ? id : ""); -} - -const char* LocaleBased::getLocaleID(const CharString* valid, const CharString* actual, +const Locale& LocaleBased::getLocale(const Locale& valid, const Locale& actual, ULocDataLocaleType type, UErrorCode& status) { if (U_FAILURE(status)) { - return nullptr; + return Locale::getRoot(); } switch(type) { case ULOC_VALID_LOCALE: - return valid == nullptr ? "" : valid->data(); + return valid; case ULOC_ACTUAL_LOCALE: - return actual == nullptr ? "" : actual->data(); + return actual; default: status = U_ILLEGAL_ARGUMENT_ERROR; - return nullptr; + return Locale::getRoot(); } } -void LocaleBased::setLocaleIDs(const CharString* validID, const CharString* actualID, UErrorCode& status) { - setValidLocaleID(validID, status); - setActualLocaleID(actualID,status); -} -void LocaleBased::setLocaleIDs(const char* validID, const char* actualID, UErrorCode& status) { - setValidLocaleID(validID, status); - setActualLocaleID(actualID,status); -} - -void LocaleBased::setLocaleID(const char* id, CharString*& dest, UErrorCode& status) { - if (U_FAILURE(status)) { return; } - if (id == nullptr || *id == 0) { - delete dest; - dest = nullptr; - } else { - if (dest == nullptr) { - dest = new CharString(id, status); - if (dest == nullptr) { - status = U_MEMORY_ALLOCATION_ERROR; - return; - } - } else { - dest->copyFrom(id, status); - } - } -} +const char* LocaleBased::getLocaleID(const Locale& valid, const Locale& actual, + ULocDataLocaleType type, UErrorCode& status) { + const Locale& locale = getLocale(valid, actual, type, status); -void LocaleBased::setLocaleID(const CharString* id, CharString*& dest, UErrorCode& status) { - if (U_FAILURE(status)) { return; } - if (id == nullptr || id->isEmpty()) { - delete dest; - dest = nullptr; - } else { - if (dest == nullptr) { - dest = new CharString(*id, status); - if (dest == nullptr) { - status = U_MEMORY_ALLOCATION_ERROR; - return; - } - } else { - dest->copyFrom(*id, status); - } + if (U_FAILURE(status)) { + return nullptr; } -} -bool LocaleBased::equalIDs(const CharString* left, const CharString* right) { - // true if both are nullptr - if (left == nullptr && right == nullptr) return true; - // false if only one is nullptr - if (left == nullptr || right == nullptr) return false; - return *left == *right; + return locale == Locale::getRoot() ? kRootLocaleName : locale.getName(); } U_NAMESPACE_END diff --git a/deps/icu-small/source/common/locbased.h b/deps/icu-small/source/common/locbased.h index 9441eb823107e3..dbff148bcd08cb 100644 --- a/deps/icu-small/source/common/locbased.h +++ b/deps/icu-small/source/common/locbased.h @@ -16,17 +16,8 @@ #include "unicode/locid.h" #include "unicode/uobject.h" -/** - * Macro to declare a locale LocaleBased wrapper object for the given - * object, which must have two members named `validLocale' and - * `actualLocale' of which are pointers to the internal icu::CharString. - */ -#define U_LOCALE_BASED(varname, objname) \ - LocaleBased varname((objname).validLocale, (objname).actualLocale) - U_NAMESPACE_BEGIN -class CharString; /** * A utility class that unifies the implementation of getLocale() by * various ICU services. This class is likely to be removed in the @@ -38,12 +29,6 @@ class U_COMMON_API LocaleBased : public UMemory { public: - /** - * Construct a LocaleBased wrapper around the two pointers. These - * will be aliased for the lifetime of this object. - */ - inline LocaleBased(CharString*& validAlias, CharString*& actualAlias); - /** * Return locale meta-data for the service object wrapped by this * object. Either the valid or the actual locale may be @@ -54,8 +39,8 @@ class U_COMMON_API LocaleBased : public UMemory { * @param status input-output error code * @return the indicated locale */ - static Locale getLocale( - const CharString* valid, const CharString* actual, + static const Locale& getLocale( + const Locale& valid, const Locale& actual, ULocDataLocaleType type, UErrorCode& status); /** @@ -69,51 +54,11 @@ class U_COMMON_API LocaleBased : public UMemory { * @return the indicated locale ID */ static const char* getLocaleID( - const CharString* valid, const CharString* actual, + const Locale& valid, const Locale& actual, ULocDataLocaleType type, UErrorCode& status); - /** - * Set the locale meta-data for the service object wrapped by this - * object. If either parameter is zero, it is ignored. - * @param valid the ID of the valid locale - * @param actual the ID of the actual locale - */ - void setLocaleIDs(const char* valid, const char* actual, UErrorCode& status); - void setLocaleIDs(const CharString* valid, const CharString* actual, UErrorCode& status); - - static void setLocaleID(const char* id, CharString*& dest, UErrorCode& status); - static void setLocaleID(const CharString* id, CharString*& dest, UErrorCode& status); - - static bool equalIDs(const CharString* left, const CharString* right); - - private: - - void setValidLocaleID(const CharString* id, UErrorCode& status); - void setActualLocaleID(const CharString* id, UErrorCode& status); - void setValidLocaleID(const char* id, UErrorCode& status); - void setActualLocaleID(const char* id, UErrorCode& status); - - CharString*& valid; - CharString*& actual; }; -inline LocaleBased::LocaleBased(CharString*& validAlias, CharString*& actualAlias) : - valid(validAlias), actual(actualAlias) { -} - -inline void LocaleBased::setValidLocaleID(const CharString* id, UErrorCode& status) { - setLocaleID(id, valid, status); -} -inline void LocaleBased::setActualLocaleID(const CharString* id, UErrorCode& status) { - setLocaleID(id, actual, status); -} -inline void LocaleBased::setValidLocaleID(const char* id, UErrorCode& status) { - setLocaleID(id, valid, status); -} -inline void LocaleBased::setActualLocaleID(const char* id, UErrorCode& status) { - setLocaleID(id, actual, status); -} - U_NAMESPACE_END #endif diff --git a/deps/icu-small/source/common/locdispnames.cpp b/deps/icu-small/source/common/locdispnames.cpp index d3521e879b60c8..3051798b78bc09 100644 --- a/deps/icu-small/source/common/locdispnames.cpp +++ b/deps/icu-small/source/common/locdispnames.cpp @@ -66,7 +66,7 @@ Locale::getDisplayLanguage(const Locale &displayLocale, return result; } - length=uloc_getDisplayLanguage(fullName, displayLocale.fullName, + length=uloc_getDisplayLanguage(getName(), displayLocale.getName(), buffer, result.getCapacity(), &errorCode); result.releaseBuffer(U_SUCCESS(errorCode) ? length : 0); @@ -78,7 +78,7 @@ Locale::getDisplayLanguage(const Locale &displayLocale, return result; } errorCode=U_ZERO_ERROR; - length=uloc_getDisplayLanguage(fullName, displayLocale.fullName, + length=uloc_getDisplayLanguage(getName(), displayLocale.getName(), buffer, result.getCapacity(), &errorCode); result.releaseBuffer(U_SUCCESS(errorCode) ? length : 0); @@ -106,7 +106,7 @@ Locale::getDisplayScript(const Locale &displayLocale, return result; } - length=uloc_getDisplayScript(fullName, displayLocale.fullName, + length=uloc_getDisplayScript(getName(), displayLocale.getName(), buffer, result.getCapacity(), &errorCode); result.releaseBuffer(U_SUCCESS(errorCode) ? length : 0); @@ -118,7 +118,7 @@ Locale::getDisplayScript(const Locale &displayLocale, return result; } errorCode=U_ZERO_ERROR; - length=uloc_getDisplayScript(fullName, displayLocale.fullName, + length=uloc_getDisplayScript(getName(), displayLocale.getName(), buffer, result.getCapacity(), &errorCode); result.releaseBuffer(U_SUCCESS(errorCode) ? length : 0); @@ -146,7 +146,7 @@ Locale::getDisplayCountry(const Locale &displayLocale, return result; } - length=uloc_getDisplayCountry(fullName, displayLocale.fullName, + length=uloc_getDisplayCountry(getName(), displayLocale.getName(), buffer, result.getCapacity(), &errorCode); result.releaseBuffer(U_SUCCESS(errorCode) ? length : 0); @@ -158,7 +158,7 @@ Locale::getDisplayCountry(const Locale &displayLocale, return result; } errorCode=U_ZERO_ERROR; - length=uloc_getDisplayCountry(fullName, displayLocale.fullName, + length=uloc_getDisplayCountry(getName(), displayLocale.getName(), buffer, result.getCapacity(), &errorCode); result.releaseBuffer(U_SUCCESS(errorCode) ? length : 0); @@ -186,7 +186,7 @@ Locale::getDisplayVariant(const Locale &displayLocale, return result; } - length=uloc_getDisplayVariant(fullName, displayLocale.fullName, + length=uloc_getDisplayVariant(getName(), displayLocale.getName(), buffer, result.getCapacity(), &errorCode); result.releaseBuffer(U_SUCCESS(errorCode) ? length : 0); @@ -198,7 +198,7 @@ Locale::getDisplayVariant(const Locale &displayLocale, return result; } errorCode=U_ZERO_ERROR; - length=uloc_getDisplayVariant(fullName, displayLocale.fullName, + length=uloc_getDisplayVariant(getName(), displayLocale.getName(), buffer, result.getCapacity(), &errorCode); result.releaseBuffer(U_SUCCESS(errorCode) ? length : 0); @@ -226,7 +226,7 @@ Locale::getDisplayName(const Locale &displayLocale, return result; } - length=uloc_getDisplayName(fullName, displayLocale.fullName, + length=uloc_getDisplayName(getName(), displayLocale.getName(), buffer, result.getCapacity(), &errorCode); result.releaseBuffer(U_SUCCESS(errorCode) ? length : 0); @@ -238,7 +238,7 @@ Locale::getDisplayName(const Locale &displayLocale, return result; } errorCode=U_ZERO_ERROR; - length=uloc_getDisplayName(fullName, displayLocale.fullName, + length=uloc_getDisplayName(getName(), displayLocale.getName(), buffer, result.getCapacity(), &errorCode); result.releaseBuffer(U_SUCCESS(errorCode) ? length : 0); diff --git a/deps/icu-small/source/common/locid.cpp b/deps/icu-small/source/common/locid.cpp index e7e86079ae9169..34f1266f60694c 100644 --- a/deps/icu-small/source/common/locid.cpp +++ b/deps/icu-small/source/common/locid.cpp @@ -31,13 +31,16 @@ ****************************************************************************** */ +#include #include #include +#include #include #include "unicode/bytestream.h" #include "unicode/locid.h" #include "unicode/localebuilder.h" +#include "unicode/localpointer.h" #include "unicode/strenum.h" #include "unicode/stringpiece.h" #include "unicode/uloc.h" @@ -48,6 +51,7 @@ #include "charstrmap.h" #include "cmemory.h" #include "cstring.h" +#include "fixedstring.h" #include "mutex.h" #include "putilimp.h" #include "uassert.h" @@ -232,9 +236,214 @@ locale_get_default() return Locale::getDefault().getName(); } +namespace { + +template +void copyToArray(std::string_view sv, T* that) { + auto& field = that->*FIELD; + constexpr size_t capacity = std::extent_v>; + static_assert(capacity > 0); + if (!sv.empty()) { + U_ASSERT(sv.size() < capacity); + uprv_memcpy(field, sv.data(), sv.size()); + } + field[sv.size()] = '\0'; +} + +} // namespace U_NAMESPACE_BEGIN +void Locale::Nest::init(std::string_view language, + std::string_view script, + std::string_view region, + uint8_t variantBegin) { + copyToArray<&Nest::language>(language, this); + copyToArray<&Nest::script>(script, this); + copyToArray<&Nest::region>(region, this); + this->variantBegin = variantBegin; +} + +Locale::Nest::Nest(Heap&& heap, uint8_t variantBegin) { + // When moving from Heap to Nest the language field can be left untouched + // (as it has the same offset in both) and only the script and region fields + // need to be copied to their new locations, which is safe to do because the + // new locations come before the old locations in memory and don't overlap. + static_assert(offsetof(Nest, region) <= offsetof(Heap, script)); + static_assert(offsetof(Nest, variantBegin) <= offsetof(Heap, region)); + U_ASSERT(this == reinterpret_cast(&heap)); + copyToArray<&Nest::script>(heap.script, this); + copyToArray<&Nest::region>(heap.region, this); + this->variantBegin = variantBegin; + *this->baseName = '\0'; +} + +struct Locale::Heap::Alloc : public UMemory { + FixedString fullName; + FixedString baseName; + int32_t variantBegin; + + const char* getVariant() const { return variantBegin == 0 ? "" : getBaseName() + variantBegin; } + const char* getFullName() const { return fullName.data(); } + const char* getBaseName() const { + if (baseName.isEmpty()) { + if (const char* name = fullName.data(); *name != '@') { + return name; + } + } + return baseName.data(); + } + + Alloc(int32_t variantBegin) : fullName(), baseName(), variantBegin(variantBegin) {} + + Alloc(const Alloc& other, UErrorCode& status) + : fullName(), baseName(), variantBegin(other.variantBegin) { + if (U_SUCCESS(status)) { + if (!other.fullName.isEmpty()) { + fullName = other.fullName; + if (fullName.isEmpty()) { + status = U_MEMORY_ALLOCATION_ERROR; + } else { + if (!other.baseName.isEmpty()) { + baseName = other.baseName; + if (baseName.isEmpty()) { + status = U_MEMORY_ALLOCATION_ERROR; + } + } + } + } + } + } + + // Move should be done on the owner of the pointer to this object. + Alloc(Alloc&&) noexcept = delete; + + ~Alloc() = default; +}; + +const char* Locale::Heap::getVariant() const { return ptr->getVariant(); } +const char* Locale::Heap::getFullName() const { return ptr->getFullName(); } +const char* Locale::Heap::getBaseName() const { return ptr->getBaseName(); } + +Locale::Heap::Heap(std::string_view language, + std::string_view script, + std::string_view region, + int32_t variantBegin) { + ptr = new Alloc(variantBegin); + if (ptr == nullptr) { + type = eBOGUS; + } else { + type = eHEAP; + copyToArray<&Heap::language>(language, this); + copyToArray<&Heap::script>(script, this); + copyToArray<&Heap::region>(region, this); + } +} + +Locale::Heap::~Heap() { + U_ASSERT(type == eHEAP); + delete ptr; +} + +Locale::Heap& Locale::Heap::operator=(const Heap& other) { + U_ASSERT(type == eBOGUS); + UErrorCode status = U_ZERO_ERROR; + ptr = new Alloc(*other.ptr, status); + if (ptr == nullptr || U_FAILURE(status)) { + delete ptr; + } else { + type = eHEAP; + uprv_memcpy(language, other.language, sizeof language); + uprv_memcpy(script, other.script, sizeof script); + uprv_memcpy(region, other.region, sizeof region); + } + return *this; +} + +Locale::Heap& Locale::Heap::operator=(Heap&& other) noexcept { + U_ASSERT(type == eBOGUS); + ptr = other.ptr; + type = eHEAP; + other.type = eBOGUS; + uprv_memcpy(language, other.language, sizeof language); + uprv_memcpy(script, other.script, sizeof script); + uprv_memcpy(region, other.region, sizeof region); + return *this; +} + +template +auto Locale::Payload::visit(BogusFn bogusFn, NestFn nestFn, HeapFn heapFn, Args... args) const { + switch (type) { + case eBOGUS: + return bogusFn(args...); + case eNEST: + return nestFn(nest, args...); + case eHEAP: + return heapFn(heap, args...); + default: + UPRV_UNREACHABLE_EXIT; + }; +} + +void Locale::Payload::copy(const Payload& other) { + other.visit([](Payload*) {}, + [](const Nest& nest, Payload* dst) { dst->nest = nest; }, + [](const Heap& heap, Payload* dst) { dst->heap = heap; }, + this); +} + +void Locale::Payload::move(Payload&& other) noexcept { + other.visit( + [](Payload*) {}, + [](const Nest& nest, Payload* dst) { dst->nest = nest; }, + [](const Heap& heap, Payload* dst) { dst->heap = std::move(const_cast(heap)); }, + this); +} + +Locale::Payload::~Payload() { + if (type == eHEAP) { heap.~Heap(); } +} + +Locale::Payload::Payload(const Payload& other) : type{eBOGUS} { copy(other); } +Locale::Payload::Payload(Payload&& other) noexcept : type{eBOGUS} { move(std::move(other)); } + +Locale::Payload& Locale::Payload::operator=(const Payload& other) { + if (this != &other) { + setToBogus(); + copy(other); + } + return *this; +} + +Locale::Payload& Locale::Payload::operator=(Payload&& other) noexcept { + if (this != &other) { + setToBogus(); + move(std::move(other)); + } + return *this; +} + +void Locale::Payload::setToBogus() { + this->~Payload(); + type = eBOGUS; +} + +template T& Locale::Payload::emplace(Args&&... args) { + if constexpr (std::is_same_v) { + this->~Payload(); + ::new (&nest) Nest(std::forward(args)...); + return nest; + } + if constexpr (std::is_same_v) { + U_ASSERT(type != eHEAP); + ::new (&heap) Heap(std::forward(args)...); + return heap; + } +} + +template <> Locale::Nest* Locale::Payload::get() { return type == eNEST ? &nest : nullptr; } +template <> Locale::Heap* Locale::Payload::get() { return type == eHEAP ? &heap : nullptr; } + UOBJECT_DEFINE_RTTI_IMPLEMENTATION(Locale) /*Character separating the posix id fields*/ @@ -243,22 +452,10 @@ UOBJECT_DEFINE_RTTI_IMPLEMENTATION(Locale) #define SEP_CHAR '_' #define NULL_CHAR '\0' -Locale::~Locale() -{ - if ((baseName != fullName) && (baseName != fullNameBuffer)) { - uprv_free(baseName); - } - baseName = nullptr; - /*if fullName is on the heap, we free it*/ - if (fullName != fullNameBuffer) - { - uprv_free(fullName); - fullName = nullptr; - } -} +Locale::~Locale() = default; Locale::Locale() - : UObject(), fullName(fullNameBuffer), baseName(nullptr) + : UObject(), payload() { init(nullptr, false); } @@ -269,9 +466,8 @@ Locale::Locale() * the default locale.) */ Locale::Locale(Locale::ELocaleType) - : UObject(), fullName(fullNameBuffer), baseName(nullptr) + : UObject(), payload() { - setToBogus(); } @@ -279,7 +475,7 @@ Locale::Locale( const char * newLanguage, const char * newCountry, const char * newVariant, const char * newKeywords) - : UObject(), fullName(fullNameBuffer), baseName(nullptr) + : UObject(), payload() { if( (newLanguage==nullptr) && (newCountry == nullptr) && (newVariant == nullptr) ) { @@ -300,7 +496,6 @@ Locale::Locale( const char * newLanguage, { lsize = static_cast(uprv_strlen(newLanguage)); if ( lsize < 0 || lsize > ULOC_STRING_LIMIT ) { // int32 wrap - setToBogus(); return; } } @@ -312,7 +507,6 @@ Locale::Locale( const char * newLanguage, { csize = static_cast(uprv_strlen(newCountry)); if ( csize < 0 || csize > ULOC_STRING_LIMIT ) { // int32 wrap - setToBogus(); return; } } @@ -329,7 +523,6 @@ Locale::Locale( const char * newLanguage, // remove trailing _'s vsize = static_cast(uprv_strlen(newVariant)); if ( vsize < 0 || vsize > ULOC_STRING_LIMIT ) { // int32 wrap - setToBogus(); return; } while( (vsize>1) && (newVariant[vsize-1] == SEP_CHAR) ) @@ -342,7 +535,6 @@ Locale::Locale( const char * newLanguage, { ksize = static_cast(uprv_strlen(newKeywords)); if ( ksize < 0 || ksize > ULOC_STRING_LIMIT ) { - setToBogus(); return; } } @@ -383,7 +575,6 @@ Locale::Locale( const char * newLanguage, if (U_FAILURE(status)) { // Something went wrong with appending, etc. - setToBogus(); return; } // Parse it, because for example 'language' might really be a complete @@ -392,82 +583,11 @@ Locale::Locale( const char * newLanguage, } } -Locale::Locale(const Locale &other) - : UObject(other), fullName(fullNameBuffer), baseName(nullptr) -{ - *this = other; -} - -Locale::Locale(Locale&& other) noexcept - : UObject(other), fullName(fullNameBuffer), baseName(fullName) { - *this = std::move(other); -} - -Locale& Locale::operator=(const Locale& other) { - if (this == &other) { - return *this; - } - - setToBogus(); - - if (other.fullName == other.fullNameBuffer) { - uprv_strcpy(fullNameBuffer, other.fullNameBuffer); - } else if (other.fullName == nullptr) { - fullName = nullptr; - } else { - fullName = uprv_strdup(other.fullName); - if (fullName == nullptr) return *this; - } - - if (other.baseName == other.fullName) { - baseName = fullName; - } else if (other.baseName != nullptr) { - baseName = uprv_strdup(other.baseName); - if (baseName == nullptr) return *this; - } - - uprv_strcpy(language, other.language); - uprv_strcpy(script, other.script); - uprv_strcpy(country, other.country); - - variantBegin = other.variantBegin; - fIsBogus = other.fIsBogus; - - return *this; -} - -Locale& Locale::operator=(Locale&& other) noexcept { - if ((baseName != fullName) && (baseName != fullNameBuffer)) uprv_free(baseName); - if (fullName != fullNameBuffer) uprv_free(fullName); +Locale::Locale(const Locale&) = default; +Locale::Locale(Locale&&) noexcept = default; - if (other.fullName == other.fullNameBuffer || other.baseName == other.fullNameBuffer) { - uprv_strcpy(fullNameBuffer, other.fullNameBuffer); - } - if (other.fullName == other.fullNameBuffer) { - fullName = fullNameBuffer; - } else { - fullName = other.fullName; - } - - if (other.baseName == other.fullNameBuffer) { - baseName = fullNameBuffer; - } else if (other.baseName == other.fullName) { - baseName = fullName; - } else { - baseName = other.baseName; - } - - uprv_strcpy(language, other.language); - uprv_strcpy(script, other.script); - uprv_strcpy(country, other.country); - - variantBegin = other.variantBegin; - fIsBogus = other.fIsBogus; - - other.baseName = other.fullName = other.fullNameBuffer; - - return *this; -} +Locale& Locale::operator=(const Locale&) = default; +Locale& Locale::operator=(Locale&&) noexcept = default; Locale * Locale::clone() const { @@ -477,7 +597,7 @@ Locale::clone() const { bool Locale::operator==( const Locale& other) const { - return (uprv_strcmp(other.fullName, fullName) == 0); + return uprv_strcmp(other.getName(), getName()) == 0; } namespace { @@ -1073,7 +1193,7 @@ class AliasReplacer { } // Check the fields inside locale, if need to replace fields, - // place the the replaced locale ID in out and return true. + // place the replaced locale ID in out and return true. // Otherwise return false for no replacement or error. bool replace( const Locale& locale, CharString& out, UErrorCode& status); @@ -1836,16 +1956,8 @@ Locale& Locale::init(const char* localeID, UBool canonicalize) /*This function initializes a Locale from a C locale ID*/ Locale& Locale::init(StringPiece localeID, UBool canonicalize) { - fIsBogus = false; /* Free our current storage */ - if ((baseName != fullName) && (baseName != fullNameBuffer)) { - uprv_free(baseName); - } - baseName = nullptr; - if(fullName != fullNameBuffer) { - uprv_free(fullName); - fullName = fullNameBuffer; - } + Nest& nest = payload.emplace(); // not a loop: // just an easy way to have a common error-exit @@ -1859,9 +1971,6 @@ Locale& Locale::init(StringPiece localeID, UBool canonicalize) int32_t length; UErrorCode err; - /* preset all fields to empty */ - language[0] = script[0] = country[0] = 0; - const auto parse = [canonicalize](std::string_view localeID, char* name, int32_t nameCapacity, @@ -1879,17 +1988,17 @@ Locale& Locale::init(StringPiece localeID, UBool canonicalize) }; // "canonicalize" the locale ID to ICU/Java format + char* fullName = nest.baseName; err = U_ZERO_ERROR; - length = parse(localeID, fullName, sizeof fullNameBuffer, err); + length = parse(localeID, fullName, sizeof Nest::baseName, err); - if (err == U_BUFFER_OVERFLOW_ERROR || length >= static_cast(sizeof(fullNameBuffer))) { - U_ASSERT(baseName == nullptr); + FixedString fullNameBuffer; + if (err == U_BUFFER_OVERFLOW_ERROR || length >= static_cast(sizeof Nest::baseName)) { /*Go to heap for the fullName if necessary*/ - char* newFullName = static_cast(uprv_malloc(sizeof(char) * (length + 1))); - if (newFullName == nullptr) { + if (!fullNameBuffer.reserve(length + 1)) { break; // error: out of memory } - fullName = newFullName; + fullName = fullNameBuffer.getAlias(); err = U_ZERO_ERROR; length = parse(localeID, fullName, length + 1, err); } @@ -1898,7 +2007,10 @@ Locale& Locale::init(StringPiece localeID, UBool canonicalize) break; } - variantBegin = length; + std::string_view language; + std::string_view script; + std::string_view region; + int32_t variantBegin = length; /* after uloc_getName/canonicalize() we know that only '_' are separators */ /* But _ could also appeared in timezone such as "en@timezone=America/Los_Angeles" */ @@ -1923,8 +2035,9 @@ Locale& Locale::init(StringPiece localeID, UBool canonicalize) } else { fieldLen[fieldIdx - 1] = length - static_cast(field[fieldIdx - 1] - fullName); } + bool hasKeywords = at != nullptr && uprv_strchr(at + 1, '=') != nullptr; - if (fieldLen[0] >= static_cast(sizeof(language))) + if (fieldLen[0] >= ULOC_LANG_CAPACITY) { break; // error: the language field is too long } @@ -1932,22 +2045,19 @@ Locale& Locale::init(StringPiece localeID, UBool canonicalize) variantField = 1; /* Usually the 2nd one, except when a script or country is also used. */ if (fieldLen[0] > 0) { /* We have a language */ - uprv_memcpy(language, fullName, fieldLen[0]); - language[fieldLen[0]] = 0; + language = {fullName, static_cast(fieldLen[0])}; } if (fieldLen[1] == 4 && uprv_isASCIILetter(field[1][0]) && uprv_isASCIILetter(field[1][1]) && uprv_isASCIILetter(field[1][2]) && uprv_isASCIILetter(field[1][3])) { /* We have at least a script */ - uprv_memcpy(script, field[1], fieldLen[1]); - script[fieldLen[1]] = 0; + script = {field[1], static_cast(fieldLen[1])}; variantField++; } if (fieldLen[variantField] == 2 || fieldLen[variantField] == 3) { /* We have a country */ - uprv_memcpy(country, field[variantField], fieldLen[variantField]); - country[fieldLen[variantField]] = 0; + region = {field[variantField], static_cast(fieldLen[variantField])}; variantField++; } else if (fieldLen[variantField] == 0) { variantField++; /* script or country empty but variant in next field (i.e. en__POSIX) */ @@ -1956,16 +2066,52 @@ Locale& Locale::init(StringPiece localeID, UBool canonicalize) if (fieldLen[variantField] > 0) { /* We have a variant */ variantBegin = static_cast(field[variantField] - fullName); + } else if (hasKeywords) { + // The original computation of variantBegin leaves it equal to the length + // of fullName if there is no variant. It should instead be + // the length of the baseName. + variantBegin = static_cast(at - fullName); } - err = U_ZERO_ERROR; - initBaseName(err); - if (U_FAILURE(err)) { - break; + if (!hasKeywords && Nest::fits(length, language, script, region)) { + U_ASSERT(fullName == nest.baseName); + U_ASSERT(fullNameBuffer.isEmpty()); + nest.init(language, script, region, variantBegin); + } else { + if (fullName == nest.baseName) { + U_ASSERT(fullNameBuffer.isEmpty()); + fullNameBuffer = {fullName, static_cast(length)}; + if (fullNameBuffer.isEmpty()) { + break; // error: out of memory + } + if (!language.empty()) { + language = {fullNameBuffer.data(), language.size()}; + } + if (!script.empty()) { + script = {fullNameBuffer.data() + (script.data() - fullName), script.size()}; + } + if (!region.empty()) { + region = {fullNameBuffer.data() + (region.data() - fullName), region.size()}; + } + } + Heap& heap = payload.emplace(language, script, region, variantBegin); + if (isBogus()) { + break; // error: out of memory + } + U_ASSERT(!fullNameBuffer.isEmpty()); + heap.ptr->fullName = std::move(fullNameBuffer); + if (hasKeywords) { + if (std::string_view::size_type baseNameLength = at - fullName; baseNameLength > 0) { + heap.ptr->baseName = {heap.ptr->fullName.data(), baseNameLength}; + if (heap.ptr->baseName.isEmpty()) { + break; // error: out of memory + } + } + } } if (canonicalize) { - if (!isKnownCanonicalizedLocale(fullName, err)) { + if (!isKnownCanonicalizedLocale(getName(), err)) { CharString replaced; // Not sure it is already canonicalized if (canonicalizeLocale(*this, replaced, err)) { @@ -1989,67 +2135,16 @@ Locale& Locale::init(StringPiece localeID, UBool canonicalize) return *this; } -/* - * Set up the base name. - * If there are no key words, it's exactly the full name. - * If key words exist, it's the full name truncated at the '@' character. - * Need to set up both at init() and after setting a keyword. - */ -void -Locale::initBaseName(UErrorCode &status) { - if (U_FAILURE(status)) { - return; - } - U_ASSERT(baseName==nullptr || baseName==fullName); - const char *atPtr = uprv_strchr(fullName, '@'); - const char *eqPtr = uprv_strchr(fullName, '='); - if (atPtr && eqPtr && atPtr < eqPtr) { - // Key words exist. - int32_t baseNameLength = static_cast(atPtr - fullName); - char* newBaseName = static_cast(uprv_malloc(baseNameLength + 1)); - if (newBaseName == nullptr) { - status = U_MEMORY_ALLOCATION_ERROR; - return; - } - baseName = newBaseName; - uprv_strncpy(baseName, fullName, baseNameLength); - baseName[baseNameLength] = 0; - - // The original computation of variantBegin leaves it equal to the length - // of fullName if there is no variant. It should instead be - // the length of the baseName. - if (variantBegin > baseNameLength) { - variantBegin = baseNameLength; - } - } else { - baseName = fullName; - } -} - - int32_t Locale::hashCode() const { - return ustr_hashCharsN(fullName, static_cast(uprv_strlen(fullName))); + return ustr_hashCharsN(getName(), static_cast(uprv_strlen(getName()))); } void Locale::setToBogus() { /* Free our current storage */ - if((baseName != fullName) && (baseName != fullNameBuffer)) { - uprv_free(baseName); - } - baseName = nullptr; - if(fullName != fullNameBuffer) { - uprv_free(fullName); - fullName = fullNameBuffer; - } - *fullNameBuffer = 0; - *language = 0; - *script = 0; - *country = 0; - fIsBogus = true; - variantBegin = 0; + payload.setToBogus(); } const Locale& U_EXPORT2 @@ -2088,9 +2183,12 @@ Locale::addLikelySubtags(UErrorCode& status) { return; } - CharString maximizedLocaleID = ulocimp_addLikelySubtags(fullName, status); + CharString maximizedLocaleID = ulocimp_addLikelySubtags(getName(), status); if (U_FAILURE(status)) { + if (status == U_MEMORY_ALLOCATION_ERROR) { + setToBogus(); + } return; } @@ -2110,9 +2208,12 @@ Locale::minimizeSubtags(bool favorScript, UErrorCode& status) { return; } - CharString minimizedLocaleID = ulocimp_minimizeSubtags(fullName, favorScript, status); + CharString minimizedLocaleID = ulocimp_minimizeSubtags(getName(), favorScript, status); if (U_FAILURE(status)) { + if (status == U_MEMORY_ALLOCATION_ERROR) { + setToBogus(); + } return; } @@ -2131,8 +2232,11 @@ Locale::canonicalize(UErrorCode& status) { status = U_ILLEGAL_ARGUMENT_ERROR; return; } - CharString uncanonicalized(fullName, status); + CharString uncanonicalized(getName(), status); if (U_FAILURE(status)) { + if (status == U_MEMORY_ALLOCATION_ERROR) { + setToBogus(); + } return; } init(uncanonicalized.data(), /*canonicalize=*/true); @@ -2191,12 +2295,12 @@ Locale::toLanguageTag(ByteSink& sink, UErrorCode& status) const return; } - if (fIsBogus) { + if (isBogus()) { status = U_ILLEGAL_ARGUMENT_ERROR; return; } - ulocimp_toLanguageTag(fullName, sink, /*strict=*/false, status); + ulocimp_toLanguageTag(getName(), sink, /*strict=*/false, status); } Locale U_EXPORT2 @@ -2229,14 +2333,14 @@ Locale::createCanonical(const char* name) { const char * Locale::getISO3Language() const { - return uloc_getISO3Language(fullName); + return uloc_getISO3Language(getName()); } const char * Locale::getISO3Country() const { - return uloc_getISO3Country(fullName); + return uloc_getISO3Country(getName()); } /** @@ -2249,7 +2353,7 @@ Locale::getISO3Country() const uint32_t Locale::getLCID() const { - return uloc_getLCID(fullName); + return uloc_getLCID(getName()); } const char* const* U_EXPORT2 Locale::getISOCountries() @@ -2428,8 +2532,9 @@ Locale::getLocaleCache() class KeywordEnumeration : public StringEnumeration { protected: - CharString keywords; + FixedString keywords; private: + int32_t length; const char *current; static const char fgClassID; @@ -2438,13 +2543,17 @@ class KeywordEnumeration : public StringEnumeration { virtual UClassID getDynamicClassID() const override { return getStaticClassID(); } public: KeywordEnumeration(const char *keys, int32_t keywordLen, int32_t currentIndex, UErrorCode &status) - : keywords(), current(keywords.data()) { + : keywords(), length(keywordLen), current(nullptr) { if(U_SUCCESS(status) && keywordLen != 0) { if(keys == nullptr || keywordLen < 0) { status = U_ILLEGAL_ARGUMENT_ERROR; } else { - keywords.append(keys, keywordLen, status); - current = keywords.data() + currentIndex; + keywords = {keys, static_cast(length)}; + if (keywords.isEmpty()) { + status = U_MEMORY_ALLOCATION_ERROR; + } else { + current = keywords.data() + currentIndex; + } } } } @@ -2455,7 +2564,7 @@ class KeywordEnumeration : public StringEnumeration { { UErrorCode status = U_ZERO_ERROR; return new KeywordEnumeration( - keywords.data(), keywords.length(), + keywords.data(), length, static_cast(current - keywords.data()), status); } @@ -2556,8 +2665,8 @@ Locale::createKeywords(UErrorCode &status) const return result; } - const char* variantStart = uprv_strchr(fullName, '@'); - const char* assignment = uprv_strchr(fullName, '='); + const char* variantStart = uprv_strchr(getName(), '@'); + const char* assignment = uprv_strchr(getName(), '='); if(variantStart) { if(assignment > variantStart) { CharString keywords = ulocimp_getKeywords(variantStart + 1, '@', false, status); @@ -2583,8 +2692,8 @@ Locale::createUnicodeKeywords(UErrorCode &status) const return result; } - const char* variantStart = uprv_strchr(fullName, '@'); - const char* assignment = uprv_strchr(fullName, '='); + const char* variantStart = uprv_strchr(getName(), '@'); + const char* assignment = uprv_strchr(getName(), '='); if(variantStart) { if(assignment > variantStart) { CharString keywords = ulocimp_getKeywords(variantStart + 1, '@', false, status); @@ -2604,7 +2713,7 @@ Locale::createUnicodeKeywords(UErrorCode &status) const int32_t Locale::getKeywordValue(const char* keywordName, char *buffer, int32_t bufLen, UErrorCode &status) const { - return uloc_getKeywordValue(fullName, keywordName, buffer, bufLen, &status); + return uloc_getKeywordValue(getName(), keywordName, buffer, bufLen, &status); } void @@ -2613,12 +2722,12 @@ Locale::getKeywordValue(StringPiece keywordName, ByteSink& sink, UErrorCode& sta return; } - if (fIsBogus) { + if (isBogus()) { status = U_ILLEGAL_ARGUMENT_ERROR; return; } - ulocimp_getKeywordValue(fullName, keywordName, sink, status); + ulocimp_getKeywordValue(getName(), keywordName, sink, status); } void @@ -2664,51 +2773,77 @@ Locale::setKeywordValue(StringPiece keywordName, status = U_ZERO_ERROR; } - int32_t length = static_cast(uprv_strlen(fullName)); - int32_t capacity = fullName == fullNameBuffer ? ULOC_FULLNAME_CAPACITY : length + 1; - - const char* start = locale_getKeywordsStart(fullName); - int32_t offset = start == nullptr ? length : start - fullName; - - for (;;) { - // Remove -1 from the capacity so that this function can guarantee NUL termination. - CheckedArrayByteSink sink(fullName + offset, capacity - offset - 1); - - int32_t reslen = ulocimp_setKeywordValue( - {fullName + offset, static_cast(length - offset)}, - keywordName, - keywordValue, - sink, - status); + CharString localeID(getName(), -1, status); + ulocimp_setKeywordValue(keywordName, keywordValue, localeID, status); + if (U_FAILURE(status)) { + if (status == U_MEMORY_ALLOCATION_ERROR) { + setToBogus(); + } + return; + } - if (status == U_BUFFER_OVERFLOW_ERROR) { - capacity = reslen + offset + 1; - char* newFullName = static_cast(uprv_malloc(capacity)); - if (newFullName == nullptr) { + const char* at = locale_getKeywordsStart(localeID.toStringPiece()); + bool hasKeywords = at != nullptr && uprv_strchr(at + 1, '=') != nullptr; + + Nest* nest = payload.get(); + if (!hasKeywords) { + if (nest == nullptr) { + // There are no longer any keywords left, so it might now be + // possible to move the payload from Heap to Nest. + Heap* heap = payload.get(); + U_ASSERT(heap != nullptr); + if (Nest::fits(localeID.length(), heap->language, heap->script, heap->region)) { + int32_t variantBegin = heap->ptr->variantBegin; + U_ASSERT(variantBegin >= 0); + U_ASSERT(static_cast(variantBegin) < sizeof Nest::baseName); + nest = &payload.emplace(std::move(*heap), static_cast(variantBegin)); + localeID.extract(nest->baseName, sizeof Nest::baseName, status); + } else { + heap->ptr->baseName.clear(); + heap->ptr->fullName = localeID.toStringPiece(); + if (heap->ptr->fullName.isEmpty()) { + status = U_MEMORY_ALLOCATION_ERROR; + setToBogus(); + return; + } + } + } + } else { + Heap* heap = nullptr; + if (nest != nullptr) { + // A keyword has been added, so the payload now needs to be moved + // from Nest to Heap so that it can get a baseName. + Nest copy(*nest); + heap = &payload.emplace(copy.language, + copy.script, + copy.region, + copy.variantBegin); + if (isBogus()) { status = U_MEMORY_ALLOCATION_ERROR; return; } - uprv_memcpy(newFullName, fullName, length + 1); - if (fullName != fullNameBuffer) { - if (baseName == fullName) { - baseName = newFullName; // baseName should not point to freed memory. + } else { + heap = payload.get(); + } + U_ASSERT(heap != nullptr); + heap->ptr->fullName = localeID.toStringPiece(); + if (heap->ptr->fullName.isEmpty()) { + status = U_MEMORY_ALLOCATION_ERROR; + setToBogus(); + return; + } + + if (heap->ptr->baseName.isEmpty()) { + // Has added the first keyword, meaning that the fullName is no longer also the baseName. + if (std::string_view::size_type baseNameLength = at - localeID.data(); baseNameLength > 0) { + heap->ptr->baseName = {heap->ptr->fullName.data(), baseNameLength}; + if (heap->ptr->baseName.isEmpty()) { + status = U_MEMORY_ALLOCATION_ERROR; + setToBogus(); + return; } - // if fullName is already on the heap, need to free it. - uprv_free(fullName); } - fullName = newFullName; - status = U_ZERO_ERROR; - continue; } - - if (U_FAILURE(status)) { return; } - u_terminateChars(fullName, capacity, reslen + offset, &status); - break; - } - - if (baseName == fullName) { - // May have added the first keyword, meaning that the fullName is no longer also the baseName. - initBaseName(status); } } @@ -2741,9 +2876,42 @@ Locale::setUnicodeKeywordValue(StringPiece keywordName, setKeywordValue(*legacy_key, value, status); } -const char * +const char* +Locale::getCountry() const { + return getField<&Nest::getRegion, &Heap::getRegion>(); +} + +const char* +Locale::getLanguage() const { + return getField<&Nest::getLanguage, &Heap::getLanguage>(); +} + +const char* +Locale::getScript() const { + return getField<&Nest::getScript, &Heap::getScript>(); +} + +const char* +Locale::getVariant() const { + return getField<&Nest::getVariant, &Heap::getVariant>(); +} + +const char* +Locale::getName() const { + return getField<&Nest::getBaseName, &Heap::getFullName>(); +} + +const char* Locale::getBaseName() const { - return baseName; + return getField<&Nest::getBaseName, &Heap::getBaseName>(); +} + +template +const char* Locale::getField() const { + return payload.visit([] { return ""; }, + [](const Nest& nest) { return (nest.*NEST)(); }, + [](const Heap& heap) { return (heap.*HEAP)(); }); } Locale::Iterator::~Iterator() = default; diff --git a/deps/icu-small/source/common/loclikely.cpp b/deps/icu-small/source/common/loclikely.cpp index f87fd8dd61ca13..1c9447fa2bf3b5 100644 --- a/deps/icu-small/source/common/loclikely.cpp +++ b/deps/icu-small/source/common/loclikely.cpp @@ -495,7 +495,7 @@ bool RegionValidateMap::equals(const RegionValidateMap& that) const { // The code transform two letter a-z to a integer valued between -1, 26x26. // -1 indicate the region is outside the range of two letter a-z // the rest of value is between 0 and 676 (= 26x26) and used as an index -// the the bigmap in map. The map is an array of 22 int32_t. +// the bigmap in map. The map is an array of 22 int32_t. // since 32x21 < 676/32 < 32x22 we store this 676 bits bitmap into 22 int32_t. int32_t RegionValidateMap::value(const char* region) const { if (uprv_isASCIILetter(region[0]) && uprv_isASCIILetter(region[1]) && diff --git a/deps/icu-small/source/common/loclikelysubtags.cpp b/deps/icu-small/source/common/loclikelysubtags.cpp index 7245a779816ce7..b37aaeec718e15 100644 --- a/deps/icu-small/source/common/loclikelysubtags.cpp +++ b/deps/icu-small/source/common/loclikelysubtags.cpp @@ -715,13 +715,29 @@ LSR LikelySubtags::maximize(StringPiece language, StringPiece script, StringPiec } else { iter.resetToState64(state); value = trieNext(iter, "", 0); - U_ASSERT(value > 0); + U_ASSERT(value != 0); + // For the case of und_Latn + if (value < 0) { + retainLanguage = !language.empty(); + retainScript = !script.empty(); + retainRegion = !region.empty(); + // Fallback to und_$region => + iter.resetToState64(trieUndState); // "und" ("*") + value = trieNext(iter, "", 0); + U_ASSERT(value == 0); + int64_t trieUndEmptyState = iter.getState64(); + value = trieNext(iter, region, 0); + // Fallback to und => + if (value < 0) { + iter.resetToState64(trieUndEmptyState); + value = trieNext(iter, "", 0); + U_ASSERT(value > 0); + } + } } } } U_ASSERT(value < lsrsLength); - const LSR &matched = lsrs[value]; - if (returnInputIfUnmatch && (!(matchLanguage || matchScript || (matchRegion && language.empty())))) { return LSR("", "", "", LSR::EXPLICIT_LSR, errorCode); // no matching. @@ -731,18 +747,23 @@ LSR LikelySubtags::maximize(StringPiece language, StringPiece script, StringPiec } if (!(retainLanguage || retainScript || retainRegion)) { + U_ASSERT(value >= 0); // Quickly return a copy of the lookup-result LSR // without new allocation of the subtags. + const LSR &matched = lsrs[value]; return LSR(matched.language, matched.script, matched.region, matched.flags); } if (!retainLanguage) { - language = matched.language; + U_ASSERT(value >= 0); + language = lsrs[value].language; } if (!retainScript) { - script = matched.script; + U_ASSERT(value >= 0); + script = lsrs[value].script; } if (!retainRegion) { - region = matched.region; + U_ASSERT(value >= 0); + region = lsrs[value].region; } int32_t retainMask = (retainLanguage ? 4 : 0) + (retainScript ? 2 : 0) + (retainRegion ? 1 : 0); // retainOldMask flags = LSR explicit-subtag flags diff --git a/deps/icu-small/source/common/lstmbe.cpp b/deps/icu-small/source/common/lstmbe.cpp index c1a142469c44d6..470e939ab02a28 100644 --- a/deps/icu-small/source/common/lstmbe.cpp +++ b/deps/icu-small/source/common/lstmbe.cpp @@ -809,7 +809,15 @@ U_CAPI const LSTMData* U_EXPORT2 CreateLSTMDataForScript(UScriptCode script, UEr U_CAPI const LSTMData* U_EXPORT2 CreateLSTMData(UResourceBundle* rb, UErrorCode& status) { - return new LSTMData(rb, status); + if (U_FAILURE(status)) { + return nullptr; + } + const LSTMData* result = new LSTMData(rb, status); + if (U_FAILURE(status)) { + delete result; + return nullptr; + } + return result; } U_CAPI const LanguageBreakEngine* U_EXPORT2 diff --git a/deps/icu-small/source/common/norm2_nfc_data.h b/deps/icu-small/source/common/norm2_nfc_data.h index 89d0287c5429f0..562c2b2513e61c 100644 --- a/deps/icu-small/source/common/norm2_nfc_data.h +++ b/deps/icu-small/source/common/norm2_nfc_data.h @@ -10,14 +10,14 @@ #ifdef INCLUDED_FROM_NORMALIZER2_CPP static const UVersionInfo norm2_nfc_data_formatVersion={5,0,0,0}; -static const UVersionInfo norm2_nfc_data_dataVersion={0x10,0,0,0}; +static const UVersionInfo norm2_nfc_data_dataVersion={0x11,0,0,0}; static const int32_t norm2_nfc_data_indexes[Normalizer2Impl::IX_COUNT]={ -0x58,0x4e84,0x8c60,0x8d60,0x8d60,0x8d60,0x8d60,0x8d60,0xc0,0x300,0xb0c,0x2a6a,0x3cf0,0xfbc4,0x12c2,0x3c26, +0x58,0x4eec,0x8cc8,0x8dc8,0x8dc8,0x8dc8,0x8dc8,0x8dc8,0xc0,0x300,0xb0c,0x2a6a,0x3cf0,0xfbc4,0x12c2,0x3c26, 0x3cbe,0x3cf0,0x300,0,0xfb10,0xfb9e }; -static const uint16_t norm2_nfc_data_trieIndex[1869]={ +static const uint16_t norm2_nfc_data_trieIndex[1888]={ 0,0x40,0x7b,0xbb,0xfb,0x13a,0x17a,0x1b2,0x1f2,0x226,0x254,0x226,0x294,0x2d4,0x313,0x353, 0x393,0x3d2,0x40f,0x44e,0x226,0x226,0x488,0x4c8,0x4f8,0x530,0x226,0x570,0x59f,0x5de,0x226,0x5f3, 0x631,0x65f,0x688,0x6be,0x6fe,0x73b,0x75b,0x79a,0x7d9,0x816,0x835,0x872,0x75b,0x8ab,0x8d9,0x918, @@ -82,7 +82,7 @@ static const uint16_t norm2_nfc_data_trieIndex[1869]={ 0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, 0x226,0x226,0x226,0x226,0x1881,0x18c1,0x1901,0x1941,0x1981,0x19c1,0x1a01,0x1a41,0x1a64,0x1aa4,0x226,0x226, 0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1ac4,0x226,0x226,0x226,0x226,0x226,0x226,0x226, -0x6cf,0x6df,0x6f7,0x716,0x72b,0x72b,0x72b,0x72f,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, +0x6e2,0x6f2,0x70a,0x729,0x73e,0x73e,0x73e,0x742,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, 0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, 0x226,0x226,0x226,0x226,0x226,0x226,0x226,0xc0c,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, 0x226,0x226,0x226,0x226,0x226,0x226,0x54f,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x40c, @@ -91,53 +91,54 @@ static const uint16_t norm2_nfc_data_trieIndex[1869]={ 0x1b1a,0x226,0x226,0x1b2a,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0xdf8,0x226, 0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, 0x226,0x1b3a,0x226,0x226,0x226,0x1b42,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, -0x1608,0x226,0x226,0x226,0x226,0x66b,0x226,0x226,0x226,0x226,0x1b50,0x54f,0x226,0x226,0x1b60,0x226, -0x226,0x226,0x226,0x226,0x226,0x226,0x81d,0x226,0x226,0x1b70,0x226,0x1b80,0x1b8d,0x1b99,0x226,0x226, -0x226,0x226,0x414,0x226,0x1ba4,0x1bb4,0x226,0x226,0x226,0x812,0x226,0x226,0x226,0x226,0x1bc4,0x226, -0x226,0x226,0x1bcf,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1bd6,0x226,0x226, -0x226,0x226,0x1be1,0x1bf0,0x928,0x1bfe,0x412,0x1c0c,0x1c1c,0x226,0x1c24,0x1c32,0x87f,0x226,0x226,0x226, -0x226,0x1c42,0x7ca,0x226,0x226,0x226,0x226,0x226,0x1c52,0x1c61,0x226,0x226,0x226,0x226,0x226,0x226, -0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x908,0x1c69,0x1c79,0x226,0x226,0x226,0x9ec,0x226,0x226, -0x226,0x226,0x226,0x226,0x226,0x1c83,0x226,0x226,0x226,0x226,0x226,0x226,0x818,0x226,0x226,0x226, -0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1c80,0x226,0x226,0x226,0x226,0x226, -0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1c93,0x812,0x226,0x226,0x226,0x226, +0x1608,0x226,0x226,0x226,0x226,0x1b50,0x226,0x226,0x226,0x226,0x1b60,0x54f,0x226,0x226,0x1b70,0x226, +0x226,0x226,0x226,0x226,0x226,0x226,0x81d,0x226,0x226,0x1b80,0x226,0x1b90,0x1b9d,0x1ba9,0x226,0x226, +0x226,0x226,0x414,0x226,0x1bb4,0x1bc4,0x226,0x226,0x226,0x812,0x226,0x226,0x226,0x226,0x1bd4,0x226, +0x226,0x226,0x1bdf,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1be6,0x226,0x226, +0x226,0x226,0x1bf1,0x1c00,0x928,0x1c0e,0x412,0x1c1c,0x1c2c,0x226,0x1c34,0x1c42,0x87f,0x226,0x226,0x226, +0x226,0x1c52,0x7ca,0x226,0x226,0x226,0x226,0x226,0x1c62,0x1c71,0x226,0x226,0x226,0x226,0x226,0x226, +0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x908,0x1c79,0x1c89,0x226,0x226,0x226,0x9ec,0x226,0x226, +0x226,0x226,0x226,0x226,0x226,0x1c93,0x226,0x226,0x226,0x226,0x226,0x226,0x818,0x226,0x226,0x226, +0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1c90,0x226,0x226,0x226,0x226,0x226, +0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1ca3,0x812,0x226,0x226,0x226,0x226, 0x226,0x226,0x226,0x226,0x226,0x87f,0x226,0x226,0x226,0x81f,0x81c,0x226,0x226,0x226,0x226,0x81a, 0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, 0x226,0x226,0x226,0x226,0x226,0x226,0x9ec,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, 0x226,0x226,0x226,0x226,0x226,0x226,0x226,0xc06,0x226,0x226,0x226,0x226,0x81c,0x226,0x226,0x226, 0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, 0x226,0xc09,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, -0x226,0x226,0x226,0x1ca2,0x1cb1,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, -0x226,0x226,0x226,0x226,0x1cc1,0x226,0x226,0x226,0xf2d,0x226,0x226,0x226,0x226,0x226,0x226,0x226, -0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1cce, -0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, +0x226,0x226,0x226,0x1cb2,0x1cc1,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, +0x226,0x226,0x226,0x226,0x1cd1,0x226,0x226,0x226,0xf2d,0x226,0x226,0x226,0x226,0x226,0x226,0x226, 0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1cde, -0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1ce0,0x226,0x226,0x226,0x226,0x226,0x226, 0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, -0x1cef,0x1cff,0x1d0d,0x1d1a,0x226,0x1d26,0x1d34,0x1d44,0x226,0x226,0x226,0x226,0xd1c,0x226,0x226,0x226, +0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1cee, +0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1cf0,0x226,0x226,0x226,0x226,0x226,0x226, +0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, +0x1cff,0x1d0f,0x1d1d,0x1d2a,0x226,0x1d36,0x1d44,0x1d54,0x226,0x226,0x226,0x226,0xd1c,0x226,0x226,0x226, 0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, -0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1d54,0x1d5c,0x1d6a,0x226,0x226,0x226,0x226,0x226, +0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1d64,0x1d6c,0x1d7a,0x226,0x226,0x226,0x226,0x226, 0x4f9,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0xf2d,0x226,0x226,0x226,0x226, 0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x7ca,0x226,0x226,0x226,0x4fc,0x226,0x226,0x226, -0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1d75,0x226, +0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1d85,0x226, 0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x5c1,0x226, -0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1d85,0x226,0x226,0x226, -0x226,0x226,0x226,0x1d91,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1da1, -0x1db1,0x1dc1,0x1dd1,0x1de1,0x1df1,0x1e01,0x1e11,0x1e21,0x1e31,0x1e41,0x1e51,0x1e61,0x1e71,0x1e81,0x1e91,0x1ea1, -0x1eb1,0x1ec1,0x1ed1,0x1ee1,0x1ef1,0x1f01,0x1f11,0x1f21,0x1f31,0x1f41,0x1f51,0x1f61,0x1f71,0x1f81,0x1f91,0x1fa1, -0x1fb1,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, -0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x408, -0x428,0x440,0xc4,0xc4,0x460,0x46f,0x486,0x4a2,0x4bf,0x4dd,0x4fa,0x517,0x536,0x553,0x56d,0xc4, -0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0x582, -0xc4,0xc4,0xc4,0xc4,0x595,0x5a9,0x5c0,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4, +0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1d95,0x7d3,0x226, +0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1da5, +0x226,0x226,0x226,0x226,0x226,0x226,0x1db1,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, +0x226,0x226,0x1dc1,0x1dd1,0x1de1,0x1df1,0x1e01,0x1e11,0x1e21,0x1e31,0x1e41,0x1e51,0x1e61,0x1e71,0x1e81,0x1e91, +0x1ea1,0x1eb1,0x1ec1,0x1ed1,0x1ee1,0x1ef1,0x1f01,0x1f11,0x1f21,0x1f31,0x1f41,0x1f51,0x1f61,0x1f71,0x1f81,0x1f91, +0x1fa1,0x1fb1,0x1fc1,0x1fd1,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, +0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, +0x226,0x226,0x408,0x428,0x440,0xc4,0xc4,0x460,0x46f,0x486,0x4a2,0x4bf,0x4dd,0x4fa,0x517,0x536, +0x553,0x56d,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4, +0xc4,0xc4,0x582,0xc4,0xc4,0xc4,0xc4,0x595,0x5a9,0x5c0,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4, 0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4, -0xc4,0xc4,0xc4,0xc4,0xc4,0x5e0,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0x5eb,0x608, -0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0x628,0x63e,0x650,0xc4,0x66f,0xc4,0xc4,0xc4,0xc4,0xc4, +0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0x5e0,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4, +0xc4,0x5eb,0x608,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0x628,0x63e,0x650,0x66f,0x682,0xc4,0xc4, 0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4, -0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0x68f,0x6af +0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0x6a2,0x6c2 }; -static const uint16_t norm2_nfc_data_trieData[8129]={ +static const uint16_t norm2_nfc_data_trieData[8162]={ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, @@ -371,9 +372,9 @@ static const uint16_t norm2_nfc_data_trieData[8129]={ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffb8,0xffb8,0xffb8,0xffb8,0xffb8, 0xffb8,0xffcc,0xffcc,0xffb8,1,0xffb8,0xffcc,0xffcc,0xffb8,0xffb8,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffb8, -0xffcc,0xffcc,0xffcc,0xffcc,1,1,1,1,1,1,1,1,1,1,1,1, -1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, -1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc, +0xffcc,0xffcc,0xffb8,1,1,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffb8,0xffcc,0xffcc,0xffcc,0xffcc, +0xffd4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,0x8c4,0x1a65,0x8c8,0x1a6b,0x8cc,0x1a71,0x8d0,0x1a77,0x8d4,0x1a7d,1, 1,0x8d8,0x1a83,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, @@ -575,6 +576,7 @@ static const uint16_t norm2_nfc_data_trieData[8129]={ 1,1,1,1,1,1,1,0xffb8,1,0xffcc,1,1,1,1,1,1, 1,1,0xffcc,0xfe02,0xffb8,1,1,1,1,0xfe12,1,1,1,1,0xffcc,0xffcc, 0xffcc,0xffcc,1,1,1,1,1,1,1,1,1,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc, +1,1,1,1,1,1,1,1,1,1,0xffb8,0xffb8,1,0xffb8,0xffb8,0xffb8, 1,1,1,1,1,1,0xffb8,0xffb8,0xffcc,0xffcc,0xffcc,0xffb8,0xffcc,0xffb8,0xffb8,0xffb8, 1,1,0xffcc,0xffb8,0xffcc,0xffb8,1,1,1,1,1,1,1,1,1,1, 0xfe12,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0xfe12, @@ -610,7 +612,8 @@ static const uint16_t norm2_nfc_data_trieData[8129]={ 1,1,1,1,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,1,0xffcc,0xffcc,0xffcc,0xffcc, 0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,1,1,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,1,0xffcc,0xffcc,1, 0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,1,1,1,1,1,1,1,1,1,1,1, -1,0xffd0,0xffd0,0xffb8,0xffcc,0xffb8,0xffb8,0xffb8,0xffb8,0xffb8,0xffb8,0xffb8,1,1,1,1, +1,0xffd0,0xffd0,0xffb8,0xffcc,1,1,1,0xffcc,1,1,0xffcc,1,1,1,1, +1,1,1,0xffcc,0xffcc,0xffb8,0xffb8,0xffb8,0xffb8,0xffb8,0xffb8,0xffb8,1,1,1,1, 1,1,1,1,1,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xfe0e,1,1,1,1, 1,0x33e5,0x33e9,0x33ed,0x33f1,0x33f7,0x2fd7,0x33fb,0x33ff,0x3403,0x3407,0x2fdb,0x340b,0x340f,0x3413,0x2fdf, 0x3419,0x341d,0x3421,0x3425,0x342b,0x342f,0x3433,0x3437,0x343d,0x3441,0x3445,0x3449,0x30c9,0x344d,0x3453,0x3457, @@ -646,13 +649,13 @@ static const uint16_t norm2_nfc_data_trieData[8129]={ 0x3b5f,0x3b63,0x3b67,0x3b6d,0x3b71,0x3b75,0x3b79,0x3b7d,0x3b83,0x3b89,0x3b8d,0x3b91,0x3b95,0x3b9b,0x3b9f,0x31d1, 0x31d1,0x3ba5,0x3ba9,0x3baf,0x3bb3,0x3bb7,0x3bbb,0x3bbf,0x3bc3,0x3bc7,0x3bcb,0x31d5,0x3bd1,0x3bd5,0x3bd9,0x3bdd, 0x3be1,0x3be5,0x3beb,0x3bef,0x3bf5,0x3bfb,0x3c01,0x3c05,0x3c09,0x3c0d,0x3c11,0x3c15,0x3c19,0x3c1d,0x3c21,1, -1 +1,1 }; static const UCPTrie norm2_nfc_data_trie={ norm2_nfc_data_trieIndex, { norm2_nfc_data_trieData }, - 1869, 8129, + 1888, 8162, 0x2fc00, 0x30, 0, 0, 0, 0, @@ -1160,7 +1163,7 @@ static const uint16_t norm2_nfc_data_extraData[7918]={ static const uint8_t norm2_nfc_data_smallFCD[256]={ 0xc0,0xef,3,0x7f,0xdf,0x70,0xcf,0x87,0xd7,0xe6,0x66,0x46,0x66,0x46,0x66,0x5b, -0x12,0,0,4,0,0,0,0x43,0x20,2,0x69,0xae,0xc2,0xc0,0xff,0xff, +0x12,0,0,4,0,0,0,0x43,0x20,2,0xe9,0xae,0xc2,0xc0,0xff,0xff, 0xc0,0x72,0xbf,0,0,0,0,0,0,0,0x40,0,0x80,0x88,0,0, 0xfe,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, diff --git a/deps/icu-small/source/common/normalizer2impl.h b/deps/icu-small/source/common/normalizer2impl.h index 5999190bae9bc8..94047336f223db 100644 --- a/deps/icu-small/source/common/normalizer2impl.h +++ b/deps/icu-small/source/common/normalizer2impl.h @@ -243,32 +243,36 @@ class U_COMMON_API ReorderingBuffer : public UMemory { * this normalizer2impl.h and in the design doc at * https://unicode-org.github.io/icu/design/normalization/custom.html */ -class U_COMMON_API Normalizer2Impl : public UObject { +class U_COMMON_API_CLASS Normalizer2Impl : public UObject { public: - Normalizer2Impl() : normTrie(nullptr), fCanonIterData(nullptr) {} - virtual ~Normalizer2Impl(); + U_COMMON_API Normalizer2Impl() : normTrie(nullptr), fCanonIterData(nullptr) {} + U_COMMON_API virtual ~Normalizer2Impl(); - void init(const int32_t *inIndexes, const UCPTrie *inTrie, - const uint16_t *inExtraData, const uint8_t *inSmallFCD); + U_COMMON_API void init(const int32_t* inIndexes, + const UCPTrie* inTrie, + const uint16_t* inExtraData, + const uint8_t* inSmallFCD); - void addLcccChars(UnicodeSet &set) const; - void addPropertyStarts(const USetAdder *sa, UErrorCode &errorCode) const; - void addCanonIterPropertyStarts(const USetAdder *sa, UErrorCode &errorCode) const; + U_COMMON_API void addLcccChars(UnicodeSet& set) const; + U_COMMON_API void addPropertyStarts(const USetAdder* sa, UErrorCode& errorCode) const; + U_COMMON_API void addCanonIterPropertyStarts(const USetAdder* sa, UErrorCode& errorCode) const; // low-level properties ------------------------------------------------ *** - UBool ensureCanonIterData(UErrorCode &errorCode) const; + U_COMMON_API UBool ensureCanonIterData(UErrorCode& errorCode) const; // The trie stores values for lead surrogate code *units*. // Surrogate code *points* are inert. - uint16_t getNorm16(UChar32 c) const { + U_COMMON_API uint16_t getNorm16(UChar32 c) const { return U_IS_LEAD(c) ? static_cast(INERT) : UCPTRIE_FAST_GET(normTrie, UCPTRIE_16, c); } - uint16_t getRawNorm16(UChar32 c) const { return UCPTRIE_FAST_GET(normTrie, UCPTRIE_16, c); } + U_COMMON_API uint16_t getRawNorm16(UChar32 c) const { + return UCPTRIE_FAST_GET(normTrie, UCPTRIE_16, c); + } - UNormalizationCheckResult getCompQuickCheck(uint16_t norm16) const { + U_COMMON_API UNormalizationCheckResult getCompQuickCheck(uint16_t norm16) const { if(norm16=MIN_NORMAL_MAYBE_YES) { return getCCFromNormalYesOrMaybe(norm16); } @@ -290,13 +300,13 @@ class U_COMMON_API Normalizer2Impl : public UObject { } return getCCFromNoNo(norm16); } - static uint8_t getCCFromNormalYesOrMaybe(uint16_t norm16) { + U_COMMON_API static uint8_t getCCFromNormalYesOrMaybe(uint16_t norm16) { return static_cast(norm16 >> OFFSET_SHIFT); } - static uint8_t getCCFromYesOrMaybeYes(uint16_t norm16) { + U_COMMON_API static uint8_t getCCFromYesOrMaybeYes(uint16_t norm16) { return norm16>=MIN_NORMAL_MAYBE_YES ? getCCFromNormalYesOrMaybe(norm16) : 0; } - uint8_t getCCFromYesOrMaybeYesCP(UChar32 c) const { + U_COMMON_API uint8_t getCCFromYesOrMaybeYesCP(UChar32 c) const { if (c < minCompNoMaybeCP) { return 0; } return getCCFromYesOrMaybeYes(getNorm16(c)); } @@ -306,7 +316,7 @@ class U_COMMON_API Normalizer2Impl : public UObject { * @param c A Unicode code point. * @return The lccc(c) in bits 15..8 and tccc(c) in bits 7..0. */ - uint16_t getFCD16(UChar32 c) const { + U_COMMON_API uint16_t getFCD16(UChar32 c) const { if(c>8]; if(bits==0) { return false; } return (bits >> ((lead >> 5) & 7)) & 1; } /** Returns the FCD value from the regular normalization data. */ - uint16_t getFCD16FromNormData(UChar32 c) const; + U_COMMON_API uint16_t getFCD16FromNormData(UChar32 c) const; - uint16_t getFCD16FromMaybeOrNonZeroCC(uint16_t norm16) const; + U_COMMON_API uint16_t getFCD16FromMaybeOrNonZeroCC(uint16_t norm16) const; /** * Gets the decomposition for one code point. @@ -378,7 +388,7 @@ class U_COMMON_API Normalizer2Impl : public UObject { * @param length out-only, takes the length of the decomposition, if any * @return pointer to the decomposition, or NULL if none */ - const char16_t *getDecomposition(UChar32 c, char16_t buffer[4], int32_t &length) const; + U_COMMON_API const char16_t* getDecomposition(UChar32 c, char16_t buffer[4], int32_t& length) const; /** * Gets the raw decomposition for one code point. @@ -387,12 +397,14 @@ class U_COMMON_API Normalizer2Impl : public UObject { * @param length out-only, takes the length of the decomposition, if any * @return pointer to the decomposition, or NULL if none */ - const char16_t *getRawDecomposition(UChar32 c, char16_t buffer[30], int32_t &length) const; + U_COMMON_API const char16_t* getRawDecomposition(UChar32 c, + char16_t buffer[30], + int32_t& length) const; - UChar32 composePair(UChar32 a, UChar32 b) const; + U_COMMON_API UChar32 composePair(UChar32 a, UChar32 b) const; - UBool isCanonSegmentStarter(UChar32 c) const; - UBool getCanonStartSet(UChar32 c, UnicodeSet &set) const; + U_COMMON_API UBool isCanonSegmentStarter(UChar32 c) const; + U_COMMON_API UBool getCanonStartSet(UChar32 c, UnicodeSet& set) const; enum { // Fixed norm16 values. @@ -481,71 +493,90 @@ class U_COMMON_API Normalizer2Impl : public UObject { // higher-level functionality ------------------------------------------ *** // NFD without an NFD Normalizer2 instance. - UnicodeString &decompose(const UnicodeString &src, UnicodeString &dest, - UErrorCode &errorCode) const; + U_COMMON_API UnicodeString& decompose(const UnicodeString& src, + UnicodeString& dest, + UErrorCode& errorCode) const; /** * Decomposes [src, limit[ and writes the result to dest. * limit can be NULL if src is NUL-terminated. * destLengthEstimate is the initial dest buffer capacity and can be -1. */ - void decompose(const char16_t *src, const char16_t *limit, - UnicodeString &dest, int32_t destLengthEstimate, - UErrorCode &errorCode) const; - - const char16_t *decompose(const char16_t *src, const char16_t *limit, - ReorderingBuffer *buffer, UErrorCode &errorCode) const; - void decomposeAndAppend(const char16_t *src, const char16_t *limit, - UBool doDecompose, - UnicodeString &safeMiddle, - ReorderingBuffer &buffer, - UErrorCode &errorCode) const; + U_COMMON_API void decompose(const char16_t* src, + const char16_t* limit, + UnicodeString& dest, + int32_t destLengthEstimate, + UErrorCode& errorCode) const; + + U_COMMON_API const char16_t* decompose(const char16_t* src, + const char16_t* limit, + ReorderingBuffer* buffer, + UErrorCode& errorCode) const; + U_COMMON_API void decomposeAndAppend(const char16_t* src, + const char16_t* limit, + UBool doDecompose, + UnicodeString& safeMiddle, + ReorderingBuffer& buffer, + UErrorCode& errorCode) const; /** sink==nullptr: isNormalized()/spanQuickCheckYes() */ - const uint8_t *decomposeUTF8(uint32_t options, - const uint8_t *src, const uint8_t *limit, - ByteSink *sink, Edits *edits, UErrorCode &errorCode) const; - - UBool compose(const char16_t *src, const char16_t *limit, - UBool onlyContiguous, - UBool doCompose, - ReorderingBuffer &buffer, - UErrorCode &errorCode) const; - const char16_t *composeQuickCheck(const char16_t *src, const char16_t *limit, - UBool onlyContiguous, - UNormalizationCheckResult *pQCResult) const; - void composeAndAppend(const char16_t *src, const char16_t *limit, - UBool doCompose, - UBool onlyContiguous, - UnicodeString &safeMiddle, - ReorderingBuffer &buffer, - UErrorCode &errorCode) const; + U_COMMON_API const uint8_t* decomposeUTF8(uint32_t options, + const uint8_t* src, + const uint8_t* limit, + ByteSink* sink, + Edits* edits, + UErrorCode& errorCode) const; + + U_COMMON_API UBool compose(const char16_t* src, + const char16_t* limit, + UBool onlyContiguous, + UBool doCompose, + ReorderingBuffer& buffer, + UErrorCode& errorCode) const; + U_COMMON_API const char16_t* composeQuickCheck(const char16_t* src, + const char16_t* limit, + UBool onlyContiguous, + UNormalizationCheckResult* pQCResult) const; + U_COMMON_API void composeAndAppend(const char16_t* src, + const char16_t* limit, + UBool doCompose, + UBool onlyContiguous, + UnicodeString& safeMiddle, + ReorderingBuffer& buffer, + UErrorCode& errorCode) const; /** sink==nullptr: isNormalized() */ - UBool composeUTF8(uint32_t options, UBool onlyContiguous, - const uint8_t *src, const uint8_t *limit, - ByteSink *sink, icu::Edits *edits, UErrorCode &errorCode) const; - - const char16_t *makeFCD(const char16_t *src, const char16_t *limit, - ReorderingBuffer *buffer, UErrorCode &errorCode) const; - void makeFCDAndAppend(const char16_t *src, const char16_t *limit, - UBool doMakeFCD, - UnicodeString &safeMiddle, - ReorderingBuffer &buffer, - UErrorCode &errorCode) const; - - UBool hasDecompBoundaryBefore(UChar32 c) const; - UBool norm16HasDecompBoundaryBefore(uint16_t norm16) const; - UBool hasDecompBoundaryAfter(UChar32 c) const; - UBool norm16HasDecompBoundaryAfter(uint16_t norm16) const; - UBool isDecompInert(UChar32 c) const { return isDecompYesAndZeroCC(getNorm16(c)); } - - UBool hasCompBoundaryBefore(UChar32 c) const { + U_COMMON_API UBool composeUTF8(uint32_t options, + UBool onlyContiguous, + const uint8_t* src, + const uint8_t* limit, + ByteSink* sink, + icu::Edits* edits, + UErrorCode& errorCode) const; + + U_COMMON_API const char16_t* makeFCD(const char16_t* src, + const char16_t* limit, + ReorderingBuffer* buffer, + UErrorCode& errorCode) const; + U_COMMON_API void makeFCDAndAppend(const char16_t* src, + const char16_t* limit, + UBool doMakeFCD, + UnicodeString& safeMiddle, + ReorderingBuffer& buffer, + UErrorCode& errorCode) const; + + U_COMMON_API UBool hasDecompBoundaryBefore(UChar32 c) const; + U_COMMON_API UBool norm16HasDecompBoundaryBefore(uint16_t norm16) const; + U_COMMON_API UBool hasDecompBoundaryAfter(UChar32 c) const; + U_COMMON_API UBool norm16HasDecompBoundaryAfter(uint16_t norm16) const; + U_COMMON_API UBool isDecompInert(UChar32 c) const { return isDecompYesAndZeroCC(getNorm16(c)); } + + U_COMMON_API UBool hasCompBoundaryBefore(UChar32 c) const { return c