Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3,350 changes: 1,761 additions & 1,589 deletions libunicode-table.h

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions libunicode.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include "libunicode.h"
#include "libunicode-table.h"

// note: stored as 4 bit tag, not much room left
enum {
RUN_TYPE_U,
RUN_TYPE_L,
Expand Down
268 changes: 220 additions & 48 deletions test262_errors.txt

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion unicode_download.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh
set -e

url="ftp://ftp.unicode.org/Public/14.0.0/ucd"
url="ftp://ftp.unicode.org/Public/16.0.0/ucd"
emoji_url="${url}/emoji/emoji-data.txt"

files="CaseFolding.txt DerivedNormalizationProps.txt PropList.txt \
Expand Down
21 changes: 20 additions & 1 deletion unicode_gen.c
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,8 @@ void parse_derived_core_properties(const char *filename)
p++;
p += strspn(p, " \t");
q = buf;
while (*p != '\0' && *p != ' ' && *p != '#' && *p != '\t') {
static const char ignore[] = "\t #;"; // includes \0
while (!memchr(ignore, *p, sizeof(ignore))) {
if ((q - buf) < sizeof(buf) - 1)
*q++ = *p;
p++;
Expand Down Expand Up @@ -1098,6 +1099,24 @@ void find_run_type(TableEntry *te, CCInfo *tab, int code)
te->ext_data[1] = ci->u_data[1];
te->ext_data[2] = ci->u_data[2];
te->ext_len = 3;
} else if (ci->u_len == 2 && ci->l_len == 0 && ci->f_len == 1) {
// U+FB05 LATIN SMALL LIGATURE LONG S T
assert(code == 0xFB05);
te->len = 1;
te->type = RUN_TYPE_UF_EXT2;
te->ext_data[0] = ci->u_data[0];
te->ext_data[1] = ci->u_data[1];
te->ext_len = 2;
} else if (ci->u_len == 3 && ci->l_len == 0 && ci->f_len == 1) {
// U+1FD3 GREEK SMALL LETTER IOTA WITH DIALYTIKA AND OXIA or
// U+1FE3 GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND OXIA
assert(code == 0x1FD3 || code == 0x1FE3);
te->len = 1;
te->type = RUN_TYPE_UF_EXT3;
te->ext_data[0] = ci->u_data[0];
te->ext_data[1] = ci->u_data[1];
te->ext_data[2] = ci->u_data[2];
te->ext_len = 3;
} else {
printf("unsupported encoding case:\n");
dump_cc_info(ci, code);
Expand Down
14 changes: 14 additions & 0 deletions unicode_gen_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,13 @@ DEF(Ethiopic, "Ethi")
DEF(Georgian, "Geor")
DEF(Glagolitic, "Glag")
DEF(Gothic, "Goth")
DEF(Garay, "Gara")
DEF(Grantha, "Gran")
DEF(Greek, "Grek")
DEF(Gujarati, "Gujr")
DEF(Gunjala_Gondi, "Gong")
DEF(Gurmukhi, "Guru")
DEF(Gurung_Khema, "Gukh")
DEF(Han, "Hani")
DEF(Hangul, "Hang")
DEF(Hanifi_Rohingya, "Rohg")
Expand All @@ -112,6 +114,7 @@ DEF(Khmer, "Khmr")
DEF(Khojki, "Khoj")
DEF(Khitan_Small_Script, "Kits")
DEF(Khudawadi, "Sind")
DEF(Kirat_Rai, "Krai")
DEF(Lao, "Laoo")
DEF(Latin, "Latn")
DEF(Lepcha, "Lepc")
Expand Down Expand Up @@ -149,6 +152,7 @@ DEF(Nushu, "Nshu")
DEF(Nyiakeng_Puachue_Hmong, "Hmnp")
DEF(Ogham, "Ogam")
DEF(Ol_Chiki, "Olck")
DEF(Ol_Onal, "Onao")
DEF(Old_Hungarian, "Hung")
DEF(Old_Italic, "Ital")
DEF(Old_North_Arabian, "Narb")
Expand Down Expand Up @@ -180,6 +184,7 @@ DEF(Sogdian, "Sogd")
DEF(Sora_Sompeng, "Sora")
DEF(Soyombo, "Soyo")
DEF(Sundanese, "Sund")
DEF(Sunuwar, "Sunu")
DEF(Syloti_Nagri, "Sylo")
DEF(Syriac, "Syrc")
DEF(Tagalog, "Tglg")
Expand All @@ -197,7 +202,9 @@ DEF(Tibetan, "Tibt")
DEF(Tifinagh, "Tfng")
DEF(Tirhuta, "Tirh")
DEF(Tangsa, "Tnsa")
DEF(Todhri, "Todr")
DEF(Toto, "Toto")
DEF(Tulu_Tigalari, "Tutg")
DEF(Ugaritic, "Ugar")
DEF(Vai, "Vaii")
DEF(Vithkuqi, "Vith")
Expand Down Expand Up @@ -236,11 +243,13 @@ DEF(Deprecated, "Dep")
DEF(Diacritic, "Dia")
DEF(Extender, "Ext")
DEF(Hex_Digit, "Hex")
DEF(IDS_Unary_Operator, "IDSU")
DEF(IDS_Binary_Operator, "IDSB")
DEF(IDS_Trinary_Operator, "IDST")
DEF(Ideographic, "Ideo")
DEF(Join_Control, "Join_C")
DEF(Logical_Order_Exception, "LOE")
DEF(Modifier_Combining_Mark, "MCM")
DEF(Noncharacter_Code_Point, "NChar")
DEF(Pattern_Syntax, "Pat_Syn")
DEF(Pattern_White_Space, "Pat_WS")
Expand Down Expand Up @@ -279,6 +288,8 @@ DEF(Changes_When_Uppercased, "CWU")
DEF(Grapheme_Base, "Gr_Base")
DEF(Grapheme_Extend, "Gr_Ext")
DEF(ID_Continue, "IDC")
DEF(ID_Compat_Math_Start, "")
DEF(ID_Compat_Math_Continue, "")
DEF(Lowercase, "Lower")
DEF(Math, "")
DEF(Uppercase, "Upper")
Expand All @@ -288,4 +299,7 @@ DEF(XID_Start, "XIDS")
/* internal tables with index */
DEF(Cased1, "")

/* unused by us */
DEF(InCB, "")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is Indic_Conjunct_Break and I believe it's not supposed to be JS-visible because it isn't in V8 and test262 doesn't test it but I did see a reference to it in Servo's code base so... dunno 🤷

It's not visible in qjs at any rate.


#endif
Loading