python: Open all scripts with utf-8 encoding

This commit is contained in:
Patrick Griffis 2021-10-02 09:49:17 -05:00
parent 40399b1cb6
commit 6fd8a8f9bf

View File

@ -146,7 +146,7 @@ class Plugin:
def loadfile(self, filename): def loadfile(self, filename):
try: try:
self.filename = filename self.filename = filename
with open(filename) as f: with open(filename, encoding='utf-8') as f:
data = f.read() data = f.read()
compiled = compile_file(data, filename) compiled = compile_file(data, filename)
exec(compiled, self.globals) exec(compiled, self.globals)