fix ftl check failing in non-utf8 locale

This commit is contained in:
Damien Elmes 2021-01-19 16:28:13 +10:00
parent d273ebb756
commit d7516ae8d6

View file

@ -42,7 +42,7 @@ def check_missing_terms(path: str) -> bool:
def check_file(path: str, fix: bool) -> bool: def check_file(path: str, fix: bool) -> bool:
"True if file is ok." "True if file is ok."
orig_text = open(path).read() orig_text = open(path, encoding="utf8").read()
obj = parse(orig_text, with_spans=False) obj = parse(orig_text, with_spans=False)
# make sure there's no junk # make sure there's no junk
for ent in obj.body: for ent in obj.body: