summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorPatrick Griffis <tingping@tingping.se>2021-10-02 09:49:17 -0500
committerPatrick Griffis <tingping@tingping.se>2021-10-02 09:49:17 -0500
commit6fd8a8f9bf48562fbbc42f908321b67d436c097e (patch)
tree1e7e0efc4060de6d4828f6ce8afade84ad82a1c2
parent40399b1cb6f59f3eaf88e95cee59b53a499837a9 (diff)
python: Open all scripts with utf-8 encoding
-rw-r--r--plugins/python/python.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/python/python.py b/plugins/python/python.py
index 7bd327e3..1adcde98 100644
--- a/plugins/python/python.py
+++ b/plugins/python/python.py
@@ -146,7 +146,7 @@ class Plugin:
     def loadfile(self, filename):
         try:
             self.filename = filename
-            with open(filename) as f:
+            with open(filename, encoding='utf-8') as f:
                 data = f.read()
             compiled = compile_file(data, filename)
             exec(compiled, self.globals)