@@ -38,7 +38,7 @@ class Preprocessor():
38
38
outfile = os .path .splitext (infile )[0 ]
39
39
outfile_tmp = outfile + '.tmp.' + str (os .getpid ())
40
40
41
- with open (infile , 'r' ) as fh_in , open (outfile_tmp , 'w' ) as fh_out :
41
+ with open (infile , 'r' , encoding = 'utf-8' ) as fh_in , open (outfile_tmp , 'w' , encoding = 'utf-8 ' ) as fh_out :
42
42
for line in fh_in :
43
43
# '@@option foo' -> include file options/foo.md
44
44
if line .startswith ('@@option ' ):
@@ -71,7 +71,7 @@ class Preprocessor():
71
71
"""
72
72
for optionfile in self .used_by :
73
73
tmpfile = optionfile + '.tmp'
74
- with open (optionfile , 'r' ) as fh_in , open (tmpfile , 'w' ) as fh_out :
74
+ with open (optionfile , 'r' , encoding = 'utf-8' ) as fh_in , open (tmpfile , 'w' , encoding = 'utf-8 ' ) as fh_out :
75
75
fh_out .write ("####> This option file is used in:\n " )
76
76
used_by = ', ' .join (x for x in self .used_by [optionfile ])
77
77
fh_out .write (f"####> podman { used_by } \n " )
@@ -96,7 +96,7 @@ class Preprocessor():
96
96
# treats them as one line and will unwantedly render the
97
97
# comment in its output.
98
98
fh_out .write ("\n [//]: # (BEGIN included file " + path + ")\n " )
99
- with open (path , 'r' ) as fh_included :
99
+ with open (path , 'r' , encoding = 'utf-8' ) as fh_included :
100
100
for opt_line in fh_included :
101
101
if opt_line .startswith ('####>' ):
102
102
continue
0 commit comments