From 0c679d6a0091eae0ea2d3f3f634273e402afe645 Mon Sep 17 00:00:00 2001 From: Markus Scherer Date: Fri, 8 Apr 2016 22:24:34 +0000 Subject: [PATCH] ICU-11764 8 new script codes for Unicode 9 & CLDR 29 X-SVN-Rev: 38609 --- .../core/src/com/ibm/icu/lang/UScript.java | 53 ++++++++++++++++--- icu4j/main/shared/data/icudata.jar | 4 +- .../ibm/icu/dev/test/lang/TestUScript.java | 10 ++-- .../icu/dev/tool/layout/ScriptAndLanguages | 9 ++-- 4 files changed, 59 insertions(+), 17 deletions(-) diff --git a/icu4j/main/classes/core/src/com/ibm/icu/lang/UScript.java b/icu4j/main/classes/core/src/com/ibm/icu/lang/UScript.java index 962664f32cd..e2c237fe8de 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/lang/UScript.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/lang/UScript.java @@ -23,13 +23,13 @@ import com.ibm.icu.util.ULocale; * See UAX #24 Unicode Script Property (http://www.unicode.org/reports/tr24/) * and http://www.unicode.org/Public/UCD/latest/ucd/PropertyValueAliases.txt . * - *

Starting with ICU 3.6, constants for most ISO 15924 script codes + *

In addition, constants for many ISO 15924 script codes * are included, for use with language tags, CLDR data, and similar. * Some of those codes are not used in the Unicode Character Database (UCD). * For example, there are no characters that have a UCD script property value of * Hans or Hant. All Han ideographs have the Hani script property value in Unicode. * - *

Private-use codes Qaaa..Qabx are not included. + *

Private-use codes Qaaa..Qabx are not included, except as used in the UCD or in CLDR. * *

Starting with ICU 55, script codes are only added when their scripts * have been or will certainly be encoded in Unicode, @@ -953,18 +953,55 @@ public final class UScript { */ public static final int SIDDHAM = 166; /* Sidd */ + /** + * ISO 15924 script code + * @stable ICU 58 + */ + public static final int ADLAM = 167; /* Adlm */ + /** + * ISO 15924 script code + * @stable ICU 58 + */ + public static final int BHAIKSUKI = 168; /* Bhks */ + /** + * ISO 15924 script code + * @stable ICU 58 + */ + public static final int MARCHEN = 169; /* Marc */ + /** + * ISO 15924 script code + * @stable ICU 58 + */ + public static final int NEWA = 170; /* Newa */ + /** + * ISO 15924 script code + * @stable ICU 58 + */ + public static final int OSAGE = 171; /* Osge */ + + /** + * ISO 15924 script code + * @stable ICU 58 + */ + public static final int HAN_WITH_BOPOMOFO = 172; /* Hanb */ + /** + * ISO 15924 script code + * @stable ICU 58 + */ + public static final int JAMO = 173; /* Jamo */ + /** + * ISO 15924 script code + * @stable ICU 58 + */ + public static final int SYMBOLS_EMOJI = 174; /* Zsye */ + /** *

One higher than the last script code constant. * This value increases as constants for script codes are added. * - *

There are constants for Unicode 7 script property values. - * There are constants for ISO 15924 script codes assigned on or before 2013-10-12. - * There are no constants for private use codes from Qaaa - Qabx - * except as used in the UCD. - * * @stable ICU 2.4 */ - public static final int CODE_LIMIT = 167; + public static final int CODE_LIMIT = 175; private static int[] getCodesFromLocale(ULocale locale) { // Multi-script languages, equivalent to the LocaleScript data diff --git a/icu4j/main/shared/data/icudata.jar b/icu4j/main/shared/data/icudata.jar index fc9d6cde20e..3b83590c9f1 100755 --- a/icu4j/main/shared/data/icudata.jar +++ b/icu4j/main/shared/data/icudata.jar @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d36c81854740174ae47d429908ec6107667aebe17bf4baf819713c3ba92fb035 -size 11767365 +oid sha256:1420edbb9a70020f48c545a75738981907657c79f8c8543dbee9cbbb75ada655 +size 11767515 diff --git a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/lang/TestUScript.java b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/lang/TestUScript.java index 5754680a8f8..3eee873bdaa 100644 --- a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/lang/TestUScript.java +++ b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/lang/TestUScript.java @@ -1,6 +1,6 @@ /** ******************************************************************************* -* Copyright (C) 1996-2015, International Business Machines Corporation and +* Copyright (C) 1996-2016, International Business Machines Corporation and * others. All Rights Reserved. ******************************************************************************* */ @@ -635,7 +635,9 @@ public class TestUScript extends TestFmwk { /* new in ICU 52 */ "Caucasian_Albanian", "Mahajani", /* new in ICU 54 */ - "Ahom", "Hatran", "Modi", "Multani", "Pau_Cin_Hau", "Siddham" + "Ahom", "Hatran", "Modi", "Multani", "Pau_Cin_Hau", "Siddham", + // new in ICU 58 + "Adlam", "Bhaiksuki", "Marchen", "Newa", "Osage", "Hanb", "Jamo", "Zsye" }; String[] expectedShort = new String[]{ "Bali", "Batk", "Blis", "Brah", "Cham", "Cirt", "Cyrs", "Egyd", "Egyh", "Egyp", @@ -661,7 +663,9 @@ public class TestUScript extends TestFmwk { /* new in ICU 52 */ "Aghb", "Mahj", /* new in ICU 54 */ - "Ahom", "Hatr", "Modi", "Mult", "Pauc", "Sidd" + "Ahom", "Hatr", "Modi", "Mult", "Pauc", "Sidd", + // new in ICU 58 + "Adlm", "Bhks", "Marc", "Newa", "Osge", "Hanb", "Jamo", "Zsye" }; if(expectedLong.length!=(UScript.CODE_LIMIT-UScript.BALINESE)) { errln("need to add new script codes in lang.TestUScript.java!"); diff --git a/icu4j/tools/misc/src/com/ibm/icu/dev/tool/layout/ScriptAndLanguages b/icu4j/tools/misc/src/com/ibm/icu/dev/tool/layout/ScriptAndLanguages index 781a8b78820..95b2e8a7f2b 100644 --- a/icu4j/tools/misc/src/com/ibm/icu/dev/tool/layout/ScriptAndLanguages +++ b/icu4j/tools/misc/src/com/ibm/icu/dev/tool/layout/ScriptAndLanguages @@ -1,15 +1,15 @@ /* * - * (C) Copyright IBM Corp. 1998-2015. All Rights Reserved. + * (C) Copyright IBM Corp. 1998-2016. All Rights Reserved. * * WARNING: THIS FILE IS MACHINE GENERATED. DO NOT HAND EDIT IT UNLESS * YOU REALLY KNOW WHAT YOU'RE DOING. * - * Generated on: 04/27/2015 10:39:37 AM PDT + * Generated on: 04/08/2016 02:00:11 PM PDT */ -ICU Version=56.0 -Total Script=166 +ICU Version=58 +Total Script=174 Total Language=71 Scripts={ ICU_2.2=40 @@ -27,6 +27,7 @@ Scripts={ ICU_49=3 ICU_52=2 ICU_54=6 + ICU_58=8 } Languages={ ICU_2.6=30