From 13f208165c94a08deb2cbc5803c9d83afc0979be Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Tue, 14 Feb 2023 11:18:51 +0100 Subject: [PATCH] Use encoding in open Python's open is locale dependent, LC_ALL=C may open it in ascii mode and fail --- tools/build_makefile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/build_makefile.py b/tools/build_makefile.py index 11ec684..6a62254 100755 --- a/tools/build_makefile.py +++ b/tools/build_makefile.py @@ -73,7 +73,7 @@ def main(): TEXT[org] = text HTML[org] = html - grep = open(org, "r").read() + grep = open(org, "r", encoding="utf-8").read() if "(eval c)" in grep: C_FILES += [c]