Do bidi synonyms properly

This commit is contained in:
Philip Hazel 2021-12-15 11:48:23 +00:00
parent 194a15315a
commit 1d432ee3cf
3 changed files with 227 additions and 256 deletions

View File

@ -109,10 +109,11 @@ utt_table += list(zip(std_category_names, category_names, ['PT_PC'] * len(catego
utt_table += list(zip(std_general_category_names, general_category_names, ['PT_GC'] * len(general_category_names)))
utt_table += list(zip(std_bidiclass_names, bidiclass_names, ['PT_BIDICL'] * len(bidiclass_names)))
# Now add our own specials. Note both the standardized and capitalized forms
# are needed.
# Now add our own specials and synonyms. Note both the standardized and
# capitalized forms are needed.
utt_table.append(('any', 'Any', 'PT_ANY'))
utt_table.append(('bidic', 'BidiC', 'PT_BIDICO'))
utt_table.append(('bidicontrol', 'Bidi_Control', 'PT_BIDICO'))
utt_table.append(('l&', 'L&', 'PT_LAMP'))
utt_table.append(('lc', 'LC', 'PT_LAMP'))

View File

@ -690,15 +690,6 @@ static uint32_t chartypeoffset[] = {
OP_STAR - OP_STAR, OP_STARI - OP_STAR,
OP_NOTSTAR - OP_STAR, OP_NOTSTARI - OP_STAR };
/* Table of synonyms for Unicode properties. Each pair has the synonym first,
followed by the name that's in the UCD table (lower case, no hyphens,
underscores, or spaces). */
static const char *prop_synonyms[] = {
"bc", "bidiclass",
"bidic", "bidicontrol"
};
/* Tables of names of POSIX character classes and their lengths. The names are
now all in a single string, to reduce the number of relocations when a shared
library is dynamically loaded. The list of lengths is terminated by a zero
@ -2131,35 +2122,6 @@ if (c == CHAR_LEFT_CURLY_BRACKET)
}
if (c != CHAR_RIGHT_CURLY_BRACKET) goto ERROR_RETURN;
name[i] = 0;
/* Implement a general synonym feature for class names. */
if (vptr != NULL) *vptr = 0; /* Terminate class name */
bot = 0;
top = sizeof(prop_synonyms)/sizeof(char *);
while (top != bot)
{
size_t mid = ((top + bot)/2) & (size_t)(~2+1); /* Mask off bottom bit */
int cf = PRIV(strcmp_c8)(name, prop_synonyms[mid]);
if (cf == 0)
{
const char *s = prop_synonyms[mid+1];
size_t slen = strlen(s);
if (vptr != NULL)
{
size_t vlen = name + i - vptr;
memmove(name + slen + 1, vptr + 1, (vlen + 1) * sizeof(PCRE2_UCHAR));
vptr = name + slen;
i = slen + vlen + 1;
}
for (size_t k = 0; k <= slen; k++) name[k] = s[k];
break;
}
if (cf > 0) bot = mid + 2; else top = mid;
}
}
/* If { doesn't follow \p or \P there is just one following character, which
@ -2175,17 +2137,22 @@ else goto ERROR_RETURN;
*ptrptr = ptr;
/* If the property contains ':' or '=' we have class name and value separately
specified. The only case currently supported is Bidi_Class, for which the
property names are "bidi<name>". */
specified. The only case currently supported is Bidi_Class (synonym BC), for
which the property names are "bidi<name>". */
if (vptr != NULL)
{
if (PRIV(strcmp_c8)(name, "bidiclass") != 0)
*vptr = 0; /* Terminate property name */
if (PRIV(strcmp_c8)(name, "bidiclass") != 0 &&
PRIV(strcmp_c8)(name, "bc") != 0)
{
*errorcodeptr = ERR47;
return FALSE;
}
memmove(name + 4, vptr + 1, (name + i - vptr)*sizeof(PCRE2_UCHAR));
name[1] = 'i'; /* Can't use PRIV(strcpy)() because it adds 0 */
name[2] = 'd';
name[3] = 'i';
}
/* Search for a recognized property name using binary chop. */

View File

@ -259,6 +259,7 @@ that Unicode advises and Perl uses. */
#define STRING_bidian0 STR_b STR_i STR_d STR_i STR_a STR_n "\0"
#define STRING_bidib0 STR_b STR_i STR_d STR_i STR_b "\0"
#define STRING_bidibn0 STR_b STR_i STR_d STR_i STR_b STR_n "\0"
#define STRING_bidic0 STR_b STR_i STR_d STR_i STR_c "\0"
#define STRING_bidicontrol0 STR_b STR_i STR_d STR_i STR_c STR_o STR_n STR_t STR_r STR_o STR_l "\0"
#define STRING_bidics0 STR_b STR_i STR_d STR_i STR_c STR_s "\0"
#define STRING_bidien0 STR_b STR_i STR_d STR_i STR_e STR_n "\0"
@ -492,6 +493,7 @@ const char PRIV(utt_names)[] =
STRING_bidian0
STRING_bidib0
STRING_bidibn0
STRING_bidic0
STRING_bidicontrol0
STRING_bidics0
STRING_bidien0
@ -726,219 +728,220 @@ const ucp_type_table PRIV(utt)[] = {
{ 122, PT_BIDICL, ucp_bidiB },
{ 128, PT_BIDICL, ucp_bidiBN },
{ 135, PT_BIDICO, 0 },
{ 147, PT_BIDICL, ucp_bidiCS },
{ 154, PT_BIDICL, ucp_bidiEN },
{ 161, PT_BIDICL, ucp_bidiES },
{ 168, PT_BIDICL, ucp_bidiET },
{ 175, PT_BIDICL, ucp_bidiFSI },
{ 183, PT_BIDICL, ucp_bidiL },
{ 189, PT_BIDICL, ucp_bidiLRE },
{ 197, PT_BIDICL, ucp_bidiLRI },
{ 205, PT_BIDICL, ucp_bidiLRO },
{ 213, PT_BIDICL, ucp_bidiNSM },
{ 221, PT_BIDICL, ucp_bidiON },
{ 228, PT_BIDICL, ucp_bidiPDF },
{ 236, PT_BIDICL, ucp_bidiPDI },
{ 244, PT_BIDICL, ucp_bidiR },
{ 250, PT_BIDICL, ucp_bidiRLE },
{ 258, PT_BIDICL, ucp_bidiRLI },
{ 266, PT_BIDICL, ucp_bidiRLO },
{ 274, PT_BIDICL, ucp_bidiS },
{ 280, PT_BIDICL, ucp_bidiWS },
{ 287, PT_SC, ucp_Bopomofo },
{ 296, PT_SC, ucp_Brahmi },
{ 303, PT_SC, ucp_Braille },
{ 311, PT_SC, ucp_Buginese },
{ 320, PT_SC, ucp_Buhid },
{ 326, PT_GC, ucp_C },
{ 328, PT_SC, ucp_Canadian_Aboriginal },
{ 347, PT_SC, ucp_Carian },
{ 354, PT_SC, ucp_Caucasian_Albanian },
{ 372, PT_PC, ucp_Cc },
{ 375, PT_PC, ucp_Cf },
{ 378, PT_SC, ucp_Chakma },
{ 385, PT_SC, ucp_Cham },
{ 390, PT_SC, ucp_Cherokee },
{ 399, PT_SC, ucp_Chorasmian },
{ 410, PT_PC, ucp_Cn },
{ 413, PT_PC, ucp_Co },
{ 416, PT_SC, ucp_Common },
{ 423, PT_SC, ucp_Coptic },
{ 430, PT_PC, ucp_Cs },
{ 433, PT_SC, ucp_Cuneiform },
{ 443, PT_SC, ucp_Cypriot },
{ 451, PT_SC, ucp_Cypro_Minoan },
{ 463, PT_SC, ucp_Cyrillic },
{ 472, PT_SC, ucp_Deseret },
{ 480, PT_SC, ucp_Devanagari },
{ 491, PT_SC, ucp_Dives_Akuru },
{ 502, PT_SC, ucp_Dogra },
{ 508, PT_SC, ucp_Duployan },
{ 517, PT_SC, ucp_Egyptian_Hieroglyphs },
{ 537, PT_SC, ucp_Elbasan },
{ 545, PT_SC, ucp_Elymaic },
{ 553, PT_SC, ucp_Ethiopic },
{ 562, PT_SC, ucp_Georgian },
{ 571, PT_SC, ucp_Glagolitic },
{ 582, PT_SC, ucp_Gothic },
{ 589, PT_SC, ucp_Grantha },
{ 597, PT_SC, ucp_Greek },
{ 603, PT_SC, ucp_Gujarati },
{ 612, PT_SC, ucp_Gunjala_Gondi },
{ 625, PT_SC, ucp_Gurmukhi },
{ 634, PT_SC, ucp_Han },
{ 638, PT_SC, ucp_Hangul },
{ 645, PT_SC, ucp_Hanifi_Rohingya },
{ 660, PT_SC, ucp_Hanunoo },
{ 668, PT_SC, ucp_Hatran },
{ 675, PT_SC, ucp_Hebrew },
{ 682, PT_SC, ucp_Hiragana },
{ 691, PT_SC, ucp_Imperial_Aramaic },
{ 707, PT_SC, ucp_Inherited },
{ 717, PT_SC, ucp_Inscriptional_Pahlavi },
{ 738, PT_SC, ucp_Inscriptional_Parthian },
{ 760, PT_SC, ucp_Javanese },
{ 769, PT_SC, ucp_Kaithi },
{ 776, PT_SC, ucp_Kannada },
{ 784, PT_SC, ucp_Katakana },
{ 793, PT_SC, ucp_Kayah_Li },
{ 801, PT_SC, ucp_Kharoshthi },
{ 812, PT_SC, ucp_Khitan_Small_Script },
{ 830, PT_SC, ucp_Khmer },
{ 836, PT_SC, ucp_Khojki },
{ 843, PT_SC, ucp_Khudawadi },
{ 853, PT_GC, ucp_L },
{ 855, PT_LAMP, 0 },
{ 858, PT_SC, ucp_Lao },
{ 862, PT_SC, ucp_Latin },
{ 868, PT_LAMP, 0 },
{ 871, PT_SC, ucp_Lepcha },
{ 878, PT_SC, ucp_Limbu },
{ 884, PT_SC, ucp_Linear_A },
{ 892, PT_SC, ucp_Linear_B },
{ 900, PT_SC, ucp_Lisu },
{ 905, PT_PC, ucp_Ll },
{ 908, PT_PC, ucp_Lm },
{ 911, PT_PC, ucp_Lo },
{ 914, PT_PC, ucp_Lt },
{ 917, PT_PC, ucp_Lu },
{ 920, PT_SC, ucp_Lycian },
{ 927, PT_SC, ucp_Lydian },
{ 934, PT_GC, ucp_M },
{ 936, PT_SC, ucp_Mahajani },
{ 945, PT_SC, ucp_Makasar },
{ 953, PT_SC, ucp_Malayalam },
{ 963, PT_SC, ucp_Mandaic },
{ 971, PT_SC, ucp_Manichaean },
{ 982, PT_SC, ucp_Marchen },
{ 990, PT_SC, ucp_Masaram_Gondi },
{ 1003, PT_PC, ucp_Mc },
{ 1006, PT_PC, ucp_Me },
{ 1009, PT_SC, ucp_Medefaidrin },
{ 1021, PT_SC, ucp_Meetei_Mayek },
{ 1033, PT_SC, ucp_Mende_Kikakui },
{ 1046, PT_SC, ucp_Meroitic_Cursive },
{ 1062, PT_SC, ucp_Meroitic_Hieroglyphs },
{ 1082, PT_SC, ucp_Miao },
{ 1087, PT_PC, ucp_Mn },
{ 1090, PT_SC, ucp_Modi },
{ 1095, PT_SC, ucp_Mongolian },
{ 1105, PT_SC, ucp_Mro },
{ 1109, PT_SC, ucp_Multani },
{ 1117, PT_SC, ucp_Myanmar },
{ 1125, PT_GC, ucp_N },
{ 1127, PT_SC, ucp_Nabataean },
{ 1137, PT_SC, ucp_Nandinagari },
{ 1149, PT_PC, ucp_Nd },
{ 1152, PT_SC, ucp_Newa },
{ 1157, PT_SC, ucp_New_Tai_Lue },
{ 1167, PT_SC, ucp_Nko },
{ 1171, PT_PC, ucp_Nl },
{ 1174, PT_PC, ucp_No },
{ 1177, PT_SC, ucp_Nushu },
{ 1183, PT_SC, ucp_Nyiakeng_Puachue_Hmong },
{ 1204, PT_SC, ucp_Ogham },
{ 1210, PT_SC, ucp_Ol_Chiki },
{ 1218, PT_SC, ucp_Old_Hungarian },
{ 1231, PT_SC, ucp_Old_Italic },
{ 1241, PT_SC, ucp_Old_North_Arabian },
{ 1257, PT_SC, ucp_Old_Permic },
{ 1267, PT_SC, ucp_Old_Persian },
{ 1278, PT_SC, ucp_Old_Sogdian },
{ 1289, PT_SC, ucp_Old_South_Arabian },
{ 1305, PT_SC, ucp_Old_Turkic },
{ 1315, PT_SC, ucp_Old_Uyghur },
{ 1325, PT_SC, ucp_Oriya },
{ 1331, PT_SC, ucp_Osage },
{ 1337, PT_SC, ucp_Osmanya },
{ 1345, PT_GC, ucp_P },
{ 1347, PT_SC, ucp_Pahawh_Hmong },
{ 1359, PT_SC, ucp_Palmyrene },
{ 1369, PT_SC, ucp_Pau_Cin_Hau },
{ 1379, PT_PC, ucp_Pc },
{ 1382, PT_PC, ucp_Pd },
{ 1385, PT_PC, ucp_Pe },
{ 1388, PT_PC, ucp_Pf },
{ 1391, PT_SC, ucp_Phags_Pa },
{ 1399, PT_SC, ucp_Phoenician },
{ 1410, PT_PC, ucp_Pi },
{ 1413, PT_PC, ucp_Po },
{ 1416, PT_PC, ucp_Ps },
{ 1419, PT_SC, ucp_Psalter_Pahlavi },
{ 1434, PT_SC, ucp_Rejang },
{ 1441, PT_SC, ucp_Runic },
{ 1447, PT_GC, ucp_S },
{ 1449, PT_SC, ucp_Samaritan },
{ 1459, PT_SC, ucp_Saurashtra },
{ 1470, PT_PC, ucp_Sc },
{ 1473, PT_SC, ucp_Sharada },
{ 1481, PT_SC, ucp_Shavian },
{ 1489, PT_SC, ucp_Siddham },
{ 1497, PT_SC, ucp_SignWriting },
{ 1509, PT_SC, ucp_Sinhala },
{ 1517, PT_PC, ucp_Sk },
{ 1520, PT_PC, ucp_Sm },
{ 1523, PT_PC, ucp_So },
{ 1526, PT_SC, ucp_Sogdian },
{ 1534, PT_SC, ucp_Sora_Sompeng },
{ 1546, PT_SC, ucp_Soyombo },
{ 1554, PT_SC, ucp_Sundanese },
{ 1564, PT_SC, ucp_Syloti_Nagri },
{ 1576, PT_SC, ucp_Syriac },
{ 1583, PT_SC, ucp_Tagalog },
{ 1591, PT_SC, ucp_Tagbanwa },
{ 1600, PT_SC, ucp_Tai_Le },
{ 1606, PT_SC, ucp_Tai_Tham },
{ 1614, PT_SC, ucp_Tai_Viet },
{ 1622, PT_SC, ucp_Takri },
{ 1628, PT_SC, ucp_Tamil },
{ 1634, PT_SC, ucp_Tangsa },
{ 1641, PT_SC, ucp_Tangut },
{ 1648, PT_SC, ucp_Telugu },
{ 1655, PT_SC, ucp_Thaana },
{ 1662, PT_SC, ucp_Thai },
{ 1667, PT_SC, ucp_Tibetan },
{ 1675, PT_SC, ucp_Tifinagh },
{ 1684, PT_SC, ucp_Tirhuta },
{ 1692, PT_SC, ucp_Toto },
{ 1697, PT_SC, ucp_Ugaritic },
{ 1706, PT_SC, ucp_Unknown },
{ 1714, PT_SC, ucp_Vai },
{ 1718, PT_SC, ucp_Vithkuqi },
{ 1727, PT_SC, ucp_Wancho },
{ 1734, PT_SC, ucp_Warang_Citi },
{ 1745, PT_ALNUM, 0 },
{ 1749, PT_PXSPACE, 0 },
{ 1753, PT_SPACE, 0 },
{ 1757, PT_UCNC, 0 },
{ 1761, PT_WORD, 0 },
{ 1765, PT_SC, ucp_Yezidi },
{ 1772, PT_SC, ucp_Yi },
{ 1775, PT_GC, ucp_Z },
{ 1777, PT_SC, ucp_Zanabazar_Square },
{ 1793, PT_PC, ucp_Zl },
{ 1796, PT_PC, ucp_Zp },
{ 1799, PT_PC, ucp_Zs }
{ 141, PT_BIDICO, 0 },
{ 153, PT_BIDICL, ucp_bidiCS },
{ 160, PT_BIDICL, ucp_bidiEN },
{ 167, PT_BIDICL, ucp_bidiES },
{ 174, PT_BIDICL, ucp_bidiET },
{ 181, PT_BIDICL, ucp_bidiFSI },
{ 189, PT_BIDICL, ucp_bidiL },
{ 195, PT_BIDICL, ucp_bidiLRE },
{ 203, PT_BIDICL, ucp_bidiLRI },
{ 211, PT_BIDICL, ucp_bidiLRO },
{ 219, PT_BIDICL, ucp_bidiNSM },
{ 227, PT_BIDICL, ucp_bidiON },
{ 234, PT_BIDICL, ucp_bidiPDF },
{ 242, PT_BIDICL, ucp_bidiPDI },
{ 250, PT_BIDICL, ucp_bidiR },
{ 256, PT_BIDICL, ucp_bidiRLE },
{ 264, PT_BIDICL, ucp_bidiRLI },
{ 272, PT_BIDICL, ucp_bidiRLO },
{ 280, PT_BIDICL, ucp_bidiS },
{ 286, PT_BIDICL, ucp_bidiWS },
{ 293, PT_SC, ucp_Bopomofo },
{ 302, PT_SC, ucp_Brahmi },
{ 309, PT_SC, ucp_Braille },
{ 317, PT_SC, ucp_Buginese },
{ 326, PT_SC, ucp_Buhid },
{ 332, PT_GC, ucp_C },
{ 334, PT_SC, ucp_Canadian_Aboriginal },
{ 353, PT_SC, ucp_Carian },
{ 360, PT_SC, ucp_Caucasian_Albanian },
{ 378, PT_PC, ucp_Cc },
{ 381, PT_PC, ucp_Cf },
{ 384, PT_SC, ucp_Chakma },
{ 391, PT_SC, ucp_Cham },
{ 396, PT_SC, ucp_Cherokee },
{ 405, PT_SC, ucp_Chorasmian },
{ 416, PT_PC, ucp_Cn },
{ 419, PT_PC, ucp_Co },
{ 422, PT_SC, ucp_Common },
{ 429, PT_SC, ucp_Coptic },
{ 436, PT_PC, ucp_Cs },
{ 439, PT_SC, ucp_Cuneiform },
{ 449, PT_SC, ucp_Cypriot },
{ 457, PT_SC, ucp_Cypro_Minoan },
{ 469, PT_SC, ucp_Cyrillic },
{ 478, PT_SC, ucp_Deseret },
{ 486, PT_SC, ucp_Devanagari },
{ 497, PT_SC, ucp_Dives_Akuru },
{ 508, PT_SC, ucp_Dogra },
{ 514, PT_SC, ucp_Duployan },
{ 523, PT_SC, ucp_Egyptian_Hieroglyphs },
{ 543, PT_SC, ucp_Elbasan },
{ 551, PT_SC, ucp_Elymaic },
{ 559, PT_SC, ucp_Ethiopic },
{ 568, PT_SC, ucp_Georgian },
{ 577, PT_SC, ucp_Glagolitic },
{ 588, PT_SC, ucp_Gothic },
{ 595, PT_SC, ucp_Grantha },
{ 603, PT_SC, ucp_Greek },
{ 609, PT_SC, ucp_Gujarati },
{ 618, PT_SC, ucp_Gunjala_Gondi },
{ 631, PT_SC, ucp_Gurmukhi },
{ 640, PT_SC, ucp_Han },
{ 644, PT_SC, ucp_Hangul },
{ 651, PT_SC, ucp_Hanifi_Rohingya },
{ 666, PT_SC, ucp_Hanunoo },
{ 674, PT_SC, ucp_Hatran },
{ 681, PT_SC, ucp_Hebrew },
{ 688, PT_SC, ucp_Hiragana },
{ 697, PT_SC, ucp_Imperial_Aramaic },
{ 713, PT_SC, ucp_Inherited },
{ 723, PT_SC, ucp_Inscriptional_Pahlavi },
{ 744, PT_SC, ucp_Inscriptional_Parthian },
{ 766, PT_SC, ucp_Javanese },
{ 775, PT_SC, ucp_Kaithi },
{ 782, PT_SC, ucp_Kannada },
{ 790, PT_SC, ucp_Katakana },
{ 799, PT_SC, ucp_Kayah_Li },
{ 807, PT_SC, ucp_Kharoshthi },
{ 818, PT_SC, ucp_Khitan_Small_Script },
{ 836, PT_SC, ucp_Khmer },
{ 842, PT_SC, ucp_Khojki },
{ 849, PT_SC, ucp_Khudawadi },
{ 859, PT_GC, ucp_L },
{ 861, PT_LAMP, 0 },
{ 864, PT_SC, ucp_Lao },
{ 868, PT_SC, ucp_Latin },
{ 874, PT_LAMP, 0 },
{ 877, PT_SC, ucp_Lepcha },
{ 884, PT_SC, ucp_Limbu },
{ 890, PT_SC, ucp_Linear_A },
{ 898, PT_SC, ucp_Linear_B },
{ 906, PT_SC, ucp_Lisu },
{ 911, PT_PC, ucp_Ll },
{ 914, PT_PC, ucp_Lm },
{ 917, PT_PC, ucp_Lo },
{ 920, PT_PC, ucp_Lt },
{ 923, PT_PC, ucp_Lu },
{ 926, PT_SC, ucp_Lycian },
{ 933, PT_SC, ucp_Lydian },
{ 940, PT_GC, ucp_M },
{ 942, PT_SC, ucp_Mahajani },
{ 951, PT_SC, ucp_Makasar },
{ 959, PT_SC, ucp_Malayalam },
{ 969, PT_SC, ucp_Mandaic },
{ 977, PT_SC, ucp_Manichaean },
{ 988, PT_SC, ucp_Marchen },
{ 996, PT_SC, ucp_Masaram_Gondi },
{ 1009, PT_PC, ucp_Mc },
{ 1012, PT_PC, ucp_Me },
{ 1015, PT_SC, ucp_Medefaidrin },
{ 1027, PT_SC, ucp_Meetei_Mayek },
{ 1039, PT_SC, ucp_Mende_Kikakui },
{ 1052, PT_SC, ucp_Meroitic_Cursive },
{ 1068, PT_SC, ucp_Meroitic_Hieroglyphs },
{ 1088, PT_SC, ucp_Miao },
{ 1093, PT_PC, ucp_Mn },
{ 1096, PT_SC, ucp_Modi },
{ 1101, PT_SC, ucp_Mongolian },
{ 1111, PT_SC, ucp_Mro },
{ 1115, PT_SC, ucp_Multani },
{ 1123, PT_SC, ucp_Myanmar },
{ 1131, PT_GC, ucp_N },
{ 1133, PT_SC, ucp_Nabataean },
{ 1143, PT_SC, ucp_Nandinagari },
{ 1155, PT_PC, ucp_Nd },
{ 1158, PT_SC, ucp_Newa },
{ 1163, PT_SC, ucp_New_Tai_Lue },
{ 1173, PT_SC, ucp_Nko },
{ 1177, PT_PC, ucp_Nl },
{ 1180, PT_PC, ucp_No },
{ 1183, PT_SC, ucp_Nushu },
{ 1189, PT_SC, ucp_Nyiakeng_Puachue_Hmong },
{ 1210, PT_SC, ucp_Ogham },
{ 1216, PT_SC, ucp_Ol_Chiki },
{ 1224, PT_SC, ucp_Old_Hungarian },
{ 1237, PT_SC, ucp_Old_Italic },
{ 1247, PT_SC, ucp_Old_North_Arabian },
{ 1263, PT_SC, ucp_Old_Permic },
{ 1273, PT_SC, ucp_Old_Persian },
{ 1284, PT_SC, ucp_Old_Sogdian },
{ 1295, PT_SC, ucp_Old_South_Arabian },
{ 1311, PT_SC, ucp_Old_Turkic },
{ 1321, PT_SC, ucp_Old_Uyghur },
{ 1331, PT_SC, ucp_Oriya },
{ 1337, PT_SC, ucp_Osage },
{ 1343, PT_SC, ucp_Osmanya },
{ 1351, PT_GC, ucp_P },
{ 1353, PT_SC, ucp_Pahawh_Hmong },
{ 1365, PT_SC, ucp_Palmyrene },
{ 1375, PT_SC, ucp_Pau_Cin_Hau },
{ 1385, PT_PC, ucp_Pc },
{ 1388, PT_PC, ucp_Pd },
{ 1391, PT_PC, ucp_Pe },
{ 1394, PT_PC, ucp_Pf },
{ 1397, PT_SC, ucp_Phags_Pa },
{ 1405, PT_SC, ucp_Phoenician },
{ 1416, PT_PC, ucp_Pi },
{ 1419, PT_PC, ucp_Po },
{ 1422, PT_PC, ucp_Ps },
{ 1425, PT_SC, ucp_Psalter_Pahlavi },
{ 1440, PT_SC, ucp_Rejang },
{ 1447, PT_SC, ucp_Runic },
{ 1453, PT_GC, ucp_S },
{ 1455, PT_SC, ucp_Samaritan },
{ 1465, PT_SC, ucp_Saurashtra },
{ 1476, PT_PC, ucp_Sc },
{ 1479, PT_SC, ucp_Sharada },
{ 1487, PT_SC, ucp_Shavian },
{ 1495, PT_SC, ucp_Siddham },
{ 1503, PT_SC, ucp_SignWriting },
{ 1515, PT_SC, ucp_Sinhala },
{ 1523, PT_PC, ucp_Sk },
{ 1526, PT_PC, ucp_Sm },
{ 1529, PT_PC, ucp_So },
{ 1532, PT_SC, ucp_Sogdian },
{ 1540, PT_SC, ucp_Sora_Sompeng },
{ 1552, PT_SC, ucp_Soyombo },
{ 1560, PT_SC, ucp_Sundanese },
{ 1570, PT_SC, ucp_Syloti_Nagri },
{ 1582, PT_SC, ucp_Syriac },
{ 1589, PT_SC, ucp_Tagalog },
{ 1597, PT_SC, ucp_Tagbanwa },
{ 1606, PT_SC, ucp_Tai_Le },
{ 1612, PT_SC, ucp_Tai_Tham },
{ 1620, PT_SC, ucp_Tai_Viet },
{ 1628, PT_SC, ucp_Takri },
{ 1634, PT_SC, ucp_Tamil },
{ 1640, PT_SC, ucp_Tangsa },
{ 1647, PT_SC, ucp_Tangut },
{ 1654, PT_SC, ucp_Telugu },
{ 1661, PT_SC, ucp_Thaana },
{ 1668, PT_SC, ucp_Thai },
{ 1673, PT_SC, ucp_Tibetan },
{ 1681, PT_SC, ucp_Tifinagh },
{ 1690, PT_SC, ucp_Tirhuta },
{ 1698, PT_SC, ucp_Toto },
{ 1703, PT_SC, ucp_Ugaritic },
{ 1712, PT_SC, ucp_Unknown },
{ 1720, PT_SC, ucp_Vai },
{ 1724, PT_SC, ucp_Vithkuqi },
{ 1733, PT_SC, ucp_Wancho },
{ 1740, PT_SC, ucp_Warang_Citi },
{ 1751, PT_ALNUM, 0 },
{ 1755, PT_PXSPACE, 0 },
{ 1759, PT_SPACE, 0 },
{ 1763, PT_UCNC, 0 },
{ 1767, PT_WORD, 0 },
{ 1771, PT_SC, ucp_Yezidi },
{ 1778, PT_SC, ucp_Yi },
{ 1781, PT_GC, ucp_Z },
{ 1783, PT_SC, ucp_Zanabazar_Square },
{ 1799, PT_PC, ucp_Zl },
{ 1802, PT_PC, ucp_Zp },
{ 1805, PT_PC, ucp_Zs }
};
const size_t PRIV(utt_size) = sizeof(PRIV(utt)) / sizeof(ucp_type_table);