From 50f3e30afe1a9df322fc815213099f93288f8660 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Mon, 21 Nov 2022 08:42:27 +0200 Subject: [PATCH] Add encoding and newlines for consistent cross-platform Unicode support Co-authored-by: C.A.M. Gerlach --- generate-release-cycle.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/generate-release-cycle.py b/generate-release-cycle.py index 16dd23b8d7..959b6ba2ba 100644 --- a/generate-release-cycle.py +++ b/generate-release-cycle.py @@ -74,8 +74,8 @@ def save_csv(self) -> None: now_str = str(dt.datetime.utcnow()) with ( - open("include/branches.csv", "w", newline="") as file_branches, - open("include/end-of-life.csv", "w", newline="") as file_eol, + open("include/branches.csv", "w", encoding="UTF-8", newline="") as file_branches, + open("include/end-of-life.csv", "w", encoding="UTF-8", newline="") as file_eol, ): csv_branches = csv.writer(file_branches, quoting=csv.QUOTE_MINIMAL) csv_eol = csv.writer(file_eol, quoting=csv.QUOTE_MINIMAL) @@ -117,7 +117,7 @@ def save_mermaid(self) -> None: ) out.append(v) - with open("include/release-cycle.mmd", "w") as f: + with open("include/release-cycle.mmd", "w", encoding="UTF-8", newline="\n") as f: f.writelines(out)