Skip to content

Commit

Permalink
Merge pull request #56 from rth/unicode-10
Browse files Browse the repository at this point in the history
Upgrade to Unicode 10
  • Loading branch information
Manishearth authored Oct 22, 2019
2 parents e2e111e + e765bea commit 0e09a6b
Show file tree
Hide file tree
Showing 4 changed files with 1,276 additions and 1,216 deletions.
4 changes: 2 additions & 2 deletions scripts/unicode.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def is_surrogate(n):

def fetch(f):
if not os.path.exists(os.path.basename(f)):
os.system("curl -O http://www.unicode.org/Public/9.0.0/ucd/%s"
os.system("curl -O http://www.unicode.org/Public/10.0.0/ucd/%s"
% f)

if not os.path.exists(os.path.basename(f)):
Expand Down Expand Up @@ -357,4 +357,4 @@ def emit_break_module(f, break_table, break_cats, name):
for cat in sentence_cats:
sentence_table.extend([(x, y, cat) for (x, y) in sentence_cats[cat]])
sentence_table.sort(key=lambda w: w[0])
emit_break_module(rf, sentence_table, list(sentence_cats.keys()), "sentence")
emit_break_module(rf, sentence_table, list(sentence_cats.keys()), "sentence")
6 changes: 3 additions & 3 deletions scripts/unicode_gen_breaktests.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def create_grapheme_data(f):
stype = "&'static [(&'static str, &'static [&'static str])]"
dtype = "&'static [(&'static str, &'static [&'static str], &'static [&'static str])]"
f.write(" // official Unicode test data\n")
f.write(" // http://www.unicode.org/Public/9.0.0/ucd/auxiliary/GraphemeBreakTest.txt\n")
f.write(" // http://www.unicode.org/Public/10.0.0/ucd/auxiliary/GraphemeBreakTest.txt\n")
unicode.emit_table(f, "TEST_SAME", test_same, stype, True, showfun, True)
unicode.emit_table(f, "TEST_DIFF", test_diff, dtype, True, showfun, True)

Expand All @@ -187,7 +187,7 @@ def create_words_data(f):

wtype = "&'static [(&'static str, &'static [&'static str])]"
f.write(" // official Unicode test data\n")
f.write(" // http://www.unicode.org/Public/9.0.0/ucd/auxiliary/WordBreakTest.txt\n")
f.write(" // http://www.unicode.org/Public/10.0.0/ucd/auxiliary/WordBreakTest.txt\n")
unicode.emit_table(f, "TEST_WORD", test, wtype, True, showfun, True)

def create_sentence_data(f):
Expand All @@ -201,7 +201,7 @@ def create_sentence_data(f):

wtype = "&'static [(&'static str, &'static [&'static str])]"
f.write(" // official Unicode test data\n")
f.write(" // http://www.unicode.org/Public/UNIDATA/auxiliary/SentenceBreakTest.txt\n")
f.write(" // http://www.unicode.org/Public/10.0.0/ucd/auxiliary/SentenceBreakTest.txt\n")
unicode.emit_table(f, "TEST_SENTENCE", test, wtype, True, showfun, True)

if __name__ == "__main__":
Expand Down
Loading

0 comments on commit 0e09a6b

Please sign in to comment.