From c3a68bef90a0958e909fced26bb088a9ef17af58 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Tue, 17 Sep 2019 18:26:21 -0700 Subject: [PATCH] Use encoding when postprocessing the documentation files --- sphinxtools/postprocess.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sphinxtools/postprocess.py b/sphinxtools/postprocess.py index bc97b3e3..de92f1ec 100644 --- a/sphinxtools/postprocess.py +++ b/sphinxtools/postprocess.py @@ -683,7 +683,7 @@ def postProcess(folder, options): methods_done = properties_done = False - fid = open(files, "rt") + fid = textfile_open(files, "rt") orig_text = text = fid.read() fid.close() @@ -738,7 +738,7 @@ def postProcess(folder, options): newtext = addJavaScript(newtext) if orig_text != newtext: - fid = open(files, "wt") + fid = textfile_open(files, "wt") fid.write(newtext) fid.close()