fix: use explicit encoding="utf-8" for all file I/O so Windows users avoid cp1252 crashes (#543, #550, #576)

This commit is contained in:
Yijia-Xiao
2026-04-25 07:25:32 +00:00
parent fa4d01c23a
commit 872b063e69
4 changed files with 20 additions and 22 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ SavePathType = Annotated[str, "File path to save data. If None, data is not save
def save_output(data: pd.DataFrame, tag: str, save_path: SavePathType = None) -> None:
if save_path:
data.to_csv(save_path)
data.to_csv(save_path, encoding="utf-8")
print(f"{tag} saved to {save_path}")