From 1f4e46fe55c2732c2003081221667e91bf8cb363 Mon Sep 17 00:00:00 2001 From: Alexander Amiri Date: Thu, 26 Mar 2026 23:08:32 +0100 Subject: [PATCH] Fix UTF-8 encoding in sync-members.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Explicitly set encoding="utf-8" on file read/write to prevent Norwegian characters (ø, å, æ) from being corrupted on CI runners where the system locale may not default to UTF-8. --- scripts/sync-members.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/sync-members.py b/scripts/sync-members.py index 57cf3ae..5692222 100644 --- a/scripts/sync-members.py +++ b/scripts/sync-members.py @@ -261,7 +261,7 @@ def load_existing(path): try: # Use yaml if available, fall back to simple parsing import yaml - with open(path) as f: + with open(path, encoding="utf-8") as f: data = yaml.safe_load(f) if not data or "members" not in data: return {} @@ -374,7 +374,7 @@ def main(): if args.output == "-": print(content) else: - with open(args.output, "w") as f: + with open(args.output, "w", encoding="utf-8") as f: f.write(content) print(f"Written to {args.output}")