From 441752936dd6cabecaeb6188cea44fa0b19b97bb Mon Sep 17 00:00:00 2001 From: nomike Date: Wed, 18 Sep 2024 03:27:54 +0200 Subject: [PATCH] Do not read files as binary in templatehelper.readfile(). --- templatehelper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templatehelper.py b/templatehelper.py index 402504e..3a03bc6 100644 --- a/templatehelper.py +++ b/templatehelper.py @@ -163,7 +163,7 @@ def readfile(path, default=None): """ if not os.path.exists(path) and default: return default - with open(path, 'rb') as requested_file: + with open(path, 'r', encoding=locale.getpreferredencoding()) as requested_file: return requested_file.read() def getfasicon(path):