From 21a6f0b12c3e0db147b73b26fa465460f46a3bd8 Mon Sep 17 00:00:00 2001 From: Brendan Abolivier Date: Mon, 9 Sep 2019 16:34:47 +0100 Subject: Read all files as UTF-8 --- synapse/config/_base.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/synapse/config/_base.py b/synapse/config/_base.py index f7d7f153bb..ae05667a40 100644 --- a/synapse/config/_base.py +++ b/synapse/config/_base.py @@ -15,6 +15,7 @@ import argparse import errno +from io import open import os from textwrap import dedent @@ -131,7 +132,7 @@ class Config(object): @classmethod def read_file(cls, file_path, config_name): cls.check_file(file_path, config_name) - with open(file_path) as file_stream: + with open(file_path, encoding="utf-8") as file_stream: return file_stream.read() @staticmethod -- cgit 1.5.1