diff --git a/.development/pyboard_util.py b/.development/pyboard_util.py index e4f8be3..009ff3b 100644 --- a/.development/pyboard_util.py +++ b/.development/pyboard_util.py @@ -81,7 +81,7 @@ def find_tty(): def check_run(paths): for filename in paths: - with open(filename, 'r') as f: + with open(filename, 'r', encoding='utf8') as f: pyfile = f.read() compile(pyfile + '\n', filename, 'exec') diff --git a/.development/resources.py b/.development/resources.py index cae7da0..2f72c56 100644 --- a/.development/resources.py +++ b/.development/resources.py @@ -141,7 +141,7 @@ def add_metadata(path, resources): if file: try: - with open(os.path.join(path, file), "r") as stream: + with open(os.path.join(path, file), "r", encoding='utf8') as stream: resource.update(_normalize_metadata(read_metadata(stream))) except ParseException as e: resource.setdefault("errors", []).append(file + ": " + str(e)) @@ -197,7 +197,7 @@ def _validate_resource(path, resource): if file.endswith(".py"): try: filename = os.path.join(path, file) - with open(filename, 'r') as s: + with open(filename, 'r', encoding='utf8') as s: compile(s.read() + '\n', filename, 'exec') except Exception as e: resource.setdefault("errors", []).append(str(e))