summaryrefslogtreecommitdiff
path: root/sphinx/util/docutils.py
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/util/docutils.py')
-rw-r--r--sphinx/util/docutils.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/sphinx/util/docutils.py b/sphinx/util/docutils.py
index f954c81d5..e46525183 100644
--- a/sphinx/util/docutils.py
+++ b/sphinx/util/docutils.py
@@ -338,6 +338,7 @@ class SphinxFileOutput(FileOutput):
def __init__(self, **kwargs: Any) -> None:
self.overwrite_if_changed = kwargs.pop('overwrite_if_changed', False)
+ kwargs.setdefault('encoding', 'utf-8')
super().__init__(**kwargs)
def write(self, data: str) -> str: