Fix not using encoding="utf-8" when writing to files or reading from them

Co-authored-by: ChristopheClaustre <christophe.claustre.31@gmail.com>
This commit is contained in:
Kusok
2024-06-19 17:20:48 +08:00
parent cd87b0bf84
commit 0c6dbbd050
5 changed files with 8 additions and 8 deletions

View File

@@ -16,7 +16,7 @@ def parse_template(inherits, source, delimiter):
meta_prefix = delimiter + " meta-"
meta = ["name", "description", "version", "space-indent"]
with open(source) as f:
with open(source, "r", encoding="utf-8") as f:
lines = f.readlines()
for line in lines:
if line.startswith(meta_prefix):