aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/mesonlib.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2016-11-26 12:57:17 -0500
committerGitHub <noreply@github.com>2016-11-26 12:57:17 -0500
commit88d7898bb4b52e3e3dc2af58c8a346b7592c894e (patch)
tree9a7a5ad28d86e22d8213f583f97f875d402bd8bf /mesonbuild/mesonlib.py
parent09fd24ea78876924c16d9d029f4ade6d53e85c8b (diff)
parent34394afce6db988800cfecbfa32b67301fd7ba3d (diff)
downloadmeson-88d7898bb4b52e3e3dc2af58c8a346b7592c894e.zip
meson-88d7898bb4b52e3e3dc2af58c8a346b7592c894e.tar.gz
meson-88d7898bb4b52e3e3dc2af58c8a346b7592c894e.tar.bz2
Merge pull request #1092 from centricular/always-use-utf-8-py3
Always use utf-8 to write configured file and warn if the encoding is not UTF-8 compatible
Diffstat (limited to 'mesonbuild/mesonlib.py')
-rw-r--r--mesonbuild/mesonlib.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/mesonlib.py b/mesonbuild/mesonlib.py
index b92be5f..4d9cc69 100644
--- a/mesonbuild/mesonlib.py
+++ b/mesonbuild/mesonlib.py
@@ -303,7 +303,7 @@ def do_conf_file(src, dst, confdata):
replace_if_different(dst, dst_tmp)
def dump_conf_header(ofilename, cdata):
- with open(ofilename, 'w') as ofile:
+ with open(ofilename, 'w', encoding='utf-8') as ofile:
ofile.write('''/*
* Autogenerated by the Meson build system.
* Do not edit, your changes will be lost.