Skip to content

Commit

Permalink
ICU-22571 add Aran script code variant
Browse files Browse the repository at this point in the history
  • Loading branch information
markusicu committed Feb 27, 2024
1 parent c2b3282 commit d1fa15b
Show file tree
Hide file tree
Showing 11 changed files with 203 additions and 188 deletions.
366 changes: 183 additions & 183 deletions icu4c/source/common/propname_data.h

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion icu4c/source/common/uchar_props_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -4022,6 +4022,6 @@ static const uint16_t scriptExtensions[298]={
0x804f,0x37,0x804e,2,0x8057,2,0x8025,2,0x115,0x2f,0x31,0x8053,0x2f,0x31,0x80c1,0x2f,
0x8031,2,0x8007,0x79,0x80c2,0x79,0x123,0x89,0x87,0x8087};

static const int32_t indexes[UPROPS_INDEX_COUNT]={0x2d4e,0x2d4e,0x2d4e,0x2d4e,0x6d50,3,0x89ac,0x8a41,0x8a41,0x8a41,0xb48c7,0x2f75a31,0,0,0,0};
static const int32_t indexes[UPROPS_INDEX_COUNT]={0x2d4e,0x2d4e,0x2d4e,0x2d4e,0x6d50,3,0x89ac,0x8a41,0x8a41,0x8a41,0xb48c8,0x2f75a31,0,0,0,0};

#endif // INCLUDED_FROM_UCHAR_C
5 changes: 4 additions & 1 deletion icu4c/source/common/unicode/uscript.h
Original file line number Diff line number Diff line change
Expand Up @@ -500,14 +500,17 @@ typedef enum UScriptCode {
/** @stable ICU 72 */
USCRIPT_NAG_MUNDARI = 199,/* Nagm */

/** @stable ICU 75 */
USCRIPT_ARABIC_NASTALIQ = 200, /* Aran */

#ifndef U_HIDE_DEPRECATED_API
/**
* One more than the highest normal UScriptCode value.
* The highest value is available via u_getIntPropertyMaxValue(UCHAR_SCRIPT).
*
* @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
*/
USCRIPT_CODE_LIMIT = 200
USCRIPT_CODE_LIMIT = 201
#endif // U_HIDE_DEPRECATED_API
} UScriptCode;

Expand Down
Binary file modified icu4c/source/data/in/pnames.icu
Binary file not shown.
Binary file modified icu4c/source/data/in/uprops.icu
Binary file not shown.
4 changes: 4 additions & 0 deletions icu4c/source/test/cintltst/cucdapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,8 @@ void TestUScriptCodeAPI(void){
"Cypro_Minoan", "Old_Uyghur", "Tangsa", "Toto", "Vithkuqi",
// new in ICU 72
"Kawi", "Nag_Mundari",
// new in ICU 75
"Aran",
};
static const char* expectedShort[] = {
"Bali", "Batk", "Blis", "Brah", "Cham", "Cirt", "Cyrs", "Egyd", "Egyh", "Egyp",
Expand Down Expand Up @@ -471,6 +473,8 @@ void TestUScriptCodeAPI(void){
"Cpmn", "Ougr", "Tnsa", "Toto", "Vith",
// new in ICU 72
"Kawi", "Nagm",
// new in ICU 75
"Aran",
};
int32_t j = 0;
if(UPRV_LENGTHOF(expectedLong)!=(USCRIPT_CODE_LIMIT-USCRIPT_BALINESE)) {
Expand Down
5 changes: 4 additions & 1 deletion icu4j/main/core/src/main/java/com/ibm/icu/lang/UScript.java
Original file line number Diff line number Diff line change
Expand Up @@ -1065,14 +1065,17 @@ public final class UScript {
/** @stable ICU 72 */
public static final int NAG_MUNDARI = 199; /* Nagm */

/** @stable ICU 75 */
public static final int ARABIC_NASTALIQ = 200; /* Aran */

/**
* One more than the highest normal UScript code.
* The highest value is available via UCharacter.getIntPropertyMaxValue(UProperty.SCRIPT).
*
* @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
*/
@Deprecated
public static final int CODE_LIMIT = 200;
public static final int CODE_LIMIT = 201;

private static int[] getCodesFromLocale(ULocale locale) {
// Multi-script languages, equivalent to the LocaleScript data
Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,8 @@ public void TestNewCode(){
"Cypro_Minoan", "Old_Uyghur", "Tangsa", "Toto", "Vithkuqi",
// new in ICU 72
"Kawi", "Nag_Mundari",
// new in ICU 75
"Aran",
};
String[] expectedShort = new String[]{
"Bali", "Batk", "Blis", "Brah", "Cham", "Cirt", "Cyrs", "Egyd", "Egyh", "Egyp",
Expand Down Expand Up @@ -377,6 +379,8 @@ public void TestNewCode(){
"Cpmn", "Ougr", "Tnsa", "Toto", "Vith",
// new in ICU 72
"Kawi", "Nagm",
// new in ICU 75
"Aran",
};
if(expectedLong.length!=(UScript.CODE_LIMIT-UScript.BALINESE)) {
errln("need to add new script codes in lang.TestUScript.java!");
Expand Down
5 changes: 3 additions & 2 deletions tools/unicode/c/genprops/pnames_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ static const Value VALUES_nt[4] = {
Value(U_NT_NUMERIC, "Nu Numeric"),
};

static const Value VALUES_sc[200] = {
static const Value VALUES_sc[201] = {
Value(USCRIPT_COMMON, "Zyyy Common"),
Value(USCRIPT_INHERITED, "Zinh Inherited Qaai"),
Value(USCRIPT_ARABIC, "Arab Arabic"),
Expand Down Expand Up @@ -871,6 +871,7 @@ static const Value VALUES_sc[200] = {
Value(USCRIPT_VITHKUQI, "Vith Vithkuqi"),
Value(USCRIPT_KAWI, "Kawi Kawi"),
Value(USCRIPT_NAG_MUNDARI, "Nagm Nag_Mundari"),
Value(USCRIPT_ARABIC_NASTALIQ, "Aran Aran"),
};

static const Value VALUES_hst[6] = {
Expand Down Expand Up @@ -1289,7 +1290,7 @@ static const Property PROPERTIES[117] = {
Property(UCHAR_JOINING_TYPE, "jt Joining_Type", VALUES_jt, 6),
Property(UCHAR_LINE_BREAK, "lb Line_Break", VALUES_lb, 48),
Property(UCHAR_NUMERIC_TYPE, "nt Numeric_Type", VALUES_nt, 4),
Property(UCHAR_SCRIPT, "sc Script", VALUES_sc, 200),
Property(UCHAR_SCRIPT, "sc Script", VALUES_sc, 201),
Property(UCHAR_HANGUL_SYLLABLE_TYPE, "hst Hangul_Syllable_Type", VALUES_hst, 6),
Property(UCHAR_NFD_QUICK_CHECK, "NFD_QC NFD_Quick_Check", VALUES_NFD_QC, 2),
Property(UCHAR_NFKD_QUICK_CHECK, "NFKD_QC NFKD_Quick_Check", VALUES_NFKD_QC, 2),
Expand Down

0 comments on commit d1fa15b

Please sign in to comment.