| 1 |
From: =?utf-8?b?IllhbyBXZWkgKOmtj+mKmOW7tyki?= <[email protected]> |
| 2 |
Date: Tue, 15 Feb 2022 09:56:04 +0800 |
| 3 |
Subject: Read Unihan_NumericValues.txt from local Debian package |
| 4 |
|
| 5 |
--- |
| 6 |
makeunicodedata.py | 9 ++------- |
| 7 |
1 file changed, 2 insertions(+), 7 deletions(-) |
| 8 |
|
| 9 |
diff --git a/makeunicodedata.py b/makeunicodedata.py |
| 10 |
index 6dd8444..75c899e 100644 |
| 11 |
--- a/makeunicodedata.py |
| 12 |
+++ b/makeunicodedata.py |
| 13 |
@@ -1117,13 +1117,8 @@ class UnicodeData: |
| 14 |
if table[i] is not None: |
| 15 |
table[i].quick_check = quickchecks[i] |
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
+ data = open(os.path.join(DATA_DIR, 'Unihan_NumericValues.txt'), encoding='utf-8') |
| 25 |
+ for line in data.readlines(): |
| 26 |
if not line.startswith('U+'): |
| 27 |
continue |
| 28 |
code, tag, value = line.split(None, 3)[:3] |