diff --git a/buildroot/share/PlatformIO/scripts/preflight-checks.py b/buildroot/share/PlatformIO/scripts/preflight-checks.py index 8c52234a9440..307c2fb33f33 100644 --- a/buildroot/share/PlatformIO/scripts/preflight-checks.py +++ b/buildroot/share/PlatformIO/scripts/preflight-checks.py @@ -147,7 +147,7 @@ def rm_ofile(subdir, name): for f in config_files: conf_path = project_dir / "Marlin" / f if conf_path.is_file(): - with open(conf_path, 'r') as file: + with open(conf_path, 'r', encoding="utf8") as file: text = file.read() modified_text = text.replace("BOTH(", "ALL(").replace("EITHER(", "ANY(") if text != modified_text: