Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-40328: Add tool for generating cjk mapping headers #19602

Merged
merged 14 commits into from
Apr 29, 2020
Prev Previous commit
Next Next commit
bpo-40328: Update
  • Loading branch information
corona10 committed Apr 20, 2020
commit 402c0e60abb536642476f7cc7e37ab4ce0fd90ba
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ def loadmap_jisx0213(fo):


def main():
jisx0208file = open_mapping_file('data/JIS0208.TXT', MAPPINGS_JIS0208)
jisx0212file = open_mapping_file('data/JIS0212.TXT', MAPPINGS_JIS0212)
cp932file = open_mapping_file('data/CP932.TXT', MAPPINGS_CP932)
jisx0213file = open_mapping_file('data/jisx0213-2004-std.txt', MAPPINGS_JISX0213_2004)
jisx0208file = open_mapping_file('python-mappings/JIS0208.TXT', MAPPINGS_JIS0208)
jisx0212file = open_mapping_file('python-mappings/JIS0212.TXT', MAPPINGS_JIS0212)
cp932file = open_mapping_file('python-mappings/CP932.TXT', MAPPINGS_CP932)
jisx0213file = open_mapping_file('python-mappings/jisx0213-2004-std.txt', MAPPINGS_JISX0213_2004)

print("Loading Mapping File...")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@


def main():
mapfile = open_mapping_file('data/CP949.TXT', MAPPINGS_CP949)
mapfile = open_mapping_file('python-mappings/CP949.TXT', MAPPINGS_CP949)
print("Loading Mapping File...")
decmap = loadmap(mapfile)
uhcdecmap, ksx1001decmap, cp949encmap = {}, {}, {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ def parse_gb18030map(fo):

def main():
print("Loading Mapping File...")
gb2312map = open_mapping_file('data/GB2312.TXT', MAPPINGS_GB2312)
cp936map = open_mapping_file('data/CP936.TXT', MAPPINGS_CP936)
gb18030map = open_mapping_file('data/gb-18030-2000.xml', MAPPINGS_GB18030)
gb2312map = open_mapping_file('python-mappings/GB2312.TXT', MAPPINGS_GB2312)
cp936map = open_mapping_file('python-mappings/CP936.TXT', MAPPINGS_CP936)
gb18030map = open_mapping_file('python-mappings/gb-18030-2000.xml', MAPPINGS_GB18030)

gb18030decmap, gb18030unilinear = parse_gb18030map(gb18030map)
gbkdecmap = loadmap(cp936map)
Expand Down