commit
fa485aa2bd
|
@ -419,7 +419,6 @@ def compute_huffman_coding(translations, compression_filename):
|
|||
|
||||
print("//", values, lengths)
|
||||
values = [(atom if len(atom) == 1 else chr(0x80 + words.index(atom))) for atom in values]
|
||||
print("//", values, lengths)
|
||||
max_translation_encoded_length = max(
|
||||
len(translation.encode("utf-8")) for (original, translation) in translations
|
||||
)
|
||||
|
|
|
@ -18,7 +18,7 @@ parser.add_argument("--font", type=str, help="Font path", required=True)
|
|||
parser.add_argument("--extra_characters", type=str, help="Unicode string of extra characters")
|
||||
parser.add_argument(
|
||||
"--sample_file",
|
||||
type=argparse.FileType("r"),
|
||||
type=argparse.FileType("r", encoding="utf-8"),
|
||||
help="Text file that includes strings to support.",
|
||||
)
|
||||
parser.add_argument("--output_c_file", type=argparse.FileType("w"), required=True)
|
||||
|
|
Loading…
Reference in New Issue