YAML: Force all files to open with utf8

The default encoding method when opening files on Windows is cp1252
which doesn't support all unicode and can cause issues.

Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
kingbri
2023-11-29 22:04:29 -05:00
parent 3957316b79
commit 2bc3da0155
2 changed files with 3 additions and 3 deletions

View File

@@ -229,7 +229,7 @@ if __name__ == "__main__":
# Load from YAML config. Possibly add a config -> kwargs conversion function
try:
with open('config.yml', 'r') as config_file:
with open('config.yml', 'r', encoding = "utf8") as config_file:
config = yaml.safe_load(config_file) or {}
except Exception as e:
print(