()
| 206 | |
| 207 | |
| 208 | def main_hkscs(): |
| 209 | filename = f'python-mappings/hkscs-{HKSCS_VERSION}-big5-iso.txt' |
| 210 | with open_mapping_file(filename, MAPPINGS_HKSCS) as f: |
| 211 | table = parse_hkscs_map(f) |
| 212 | hkscsdecmap, hkscsencmap_bmp, hkscsencmap_nonbmp, isbmpmap = ( |
| 213 | make_hkscs_map(table) |
| 214 | ) |
| 215 | with open('mappings_hk.h', 'w') as fp: |
| 216 | print('Generating BIG5HKSCS decode map...') |
| 217 | print_autogen(fp, os.path.basename(__file__)) |
| 218 | writer = DecodeMapWriter(fp, 'big5hkscs', hkscsdecmap) |
| 219 | writer.update_decode_map(BIG5HKSCS_C1, BIG5HKSCS_C2) |
| 220 | writer.generate() |
| 221 | |
| 222 | print('Generating BIG5HKSCS decode map Unicode plane hints...') |
| 223 | writer = HintsWriter(fp, 'big5hkscs', isbmpmap) |
| 224 | writer.fillhints(bh2s(0x8740), bh2s(0xa0fe)) |
| 225 | writer.fillhints(bh2s(0xc6a1), bh2s(0xc8fe)) |
| 226 | writer.fillhints(bh2s(0xf9d6), bh2s(0xfefe)) |
| 227 | |
| 228 | print('Generating BIG5HKSCS encode map (BMP)...') |
| 229 | writer = EncodeMapWriter(fp, 'big5hkscs_bmp', hkscsencmap_bmp) |
| 230 | writer.generate() |
| 231 | |
| 232 | print('Generating BIG5HKSCS encode map (non-BMP)...') |
| 233 | writer = EncodeMapWriter(fp, 'big5hkscs_nonbmp', hkscsencmap_nonbmp) |
| 234 | writer.generate() |
| 235 | |
| 236 | |
| 237 | if __name__ == '__main__': |
no test coverage detected
searching dependent graphs…