Fix encoding errors

config.h is encoded in UTF-8.
diff --git a/scripts/config.py b/scripts/config.py
index cf347e9..3b2aa63 100755
--- a/scripts/config.py
+++ b/scripts/config.py
@@ -246,7 +246,7 @@
         super().__init__()
         self.filename = filename
         self.current_section = 'header'
-        with open(filename) as file:
+        with open(filename, 'r', encoding='utf-8') as file:
             self.templates = [self._parse_line(line) for line in file]
         self.current_section = None
 
@@ -314,7 +314,7 @@
         """
         if filename is None:
             filename = self.filename
-        with open(filename, 'w') as output:
+        with open(filename, 'w', encoding='utf-8') as output:
             self.write_to_stream(output)
 
 if __name__ == '__main__':