Skip to content

Commit

Permalink
Merge pull request micropython#4751 from jepler/fix-cp1252-build
Browse files Browse the repository at this point in the history
Fix cp1252 build
  • Loading branch information
ladyada committed May 12, 2021
2 parents 24b1b7c + 45dc095 commit fa485aa
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion py/makeqstrdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down
2 changes: 1 addition & 1 deletion tools/gen_display_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
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)
Expand Down

0 comments on commit fa485aa

Please sign in to comment.