From d7516ae8d685c813b10d71fd40bb6cc817cfee54 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Tue, 19 Jan 2021 16:28:13 +1000 Subject: [PATCH] fix ftl check failing in non-utf8 locale --- ftl/format.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ftl/format.py b/ftl/format.py index b353578db..1695dfa38 100644 --- a/ftl/format.py +++ b/ftl/format.py @@ -42,7 +42,7 @@ def check_missing_terms(path: str) -> bool: def check_file(path: str, fix: bool) -> bool: "True if file is ok." - orig_text = open(path).read() + orig_text = open(path, encoding="utf8").read() obj = parse(orig_text, with_spans=False) # make sure there's no junk for ent in obj.body: