From 403ff875b1071c4dcbd935c6d707ca9c073da0c0 Mon Sep 17 00:00:00 2001 From: franzhaas Date: Sat, 2 Dec 2023 09:30:07 +0100 Subject: [PATCH] Update save.py to use utf-8 instead of None per default I experience issues with the Null on windows. It appears as if when saving HTML, the template is already utf-8 and when writing the files with the system default code page, there are encoding issues. --- altair/utils/save.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/altair/utils/save.py b/altair/utils/save.py index af2c7a981..01a341774 100644 --- a/altair/utils/save.py +++ b/altair/utils/save.py @@ -12,7 +12,7 @@ def write_file_or_filename( fp: Union[str, pathlib.PurePath, IO], content: Union[str, bytes], mode: str = "w", - encoding: Optional[str] = None, + encoding: Optional[str] = "utf-8", ) -> None: """Write content to fp, whether fp is a string, a pathlib Path or a file-like object"""