diff --git a/novem/sync.py b/novem/sync.py index 482aaf3..64eba9a 100644 --- a/novem/sync.py +++ b/novem/sync.py @@ -52,7 +52,7 @@ def write_file(api_path: str, content: str) -> None: if not fp.parent.exists(): fp.parent.mkdir(parents=True, exist_ok=True) print(f"Creating folder: {fp.parent}") - fp.write_text(content) + fp.write_text(content, encoding="utf-8") print(f"Writing file: {fp}") def rec_tree(path: str) -> None: @@ -107,7 +107,7 @@ def walk(full: Path, api_path: str) -> None: return if full.is_file(): - files[api_path] = full.read_text() + files[api_path] = full.read_text(encoding="utf-8") elif full.is_dir(): for name in sorted(p.name for p in full.iterdir()): walk(full / name, f"{api_path}/{name}")