configure_file: Use utf-8 to write configured file

as a second part of
https://github.com/mesonbuild/meson/issues/1085
This commit is contained in:
Kseniia Vasilchuk 2016-12-21 14:56:54 +03:00 committed by Jussi Pakkanen
parent 9d1e426bcc
commit 69e2ef099c
1 changed files with 1 additions and 1 deletions

View File

@ -318,7 +318,7 @@ def do_conf_file(src, dst, confdata):
line = do_replacement(regex, line, confdata)
result.append(line)
dst_tmp = dst + '~'
with open(dst_tmp, 'w') as f:
with open(dst_tmp, 'w', encoding='utf-8') as f:
f.writelines(result)
shutil.copymode(src, dst_tmp)
replace_if_different(dst, dst_tmp)