diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2018-04-11 18:44:53 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2018-04-17 09:55:34 +0000 |
commit | 6089631a1b9cd5b9b4e75598721b53b9abc33950 (patch) | |
tree | 8bd7fe1e0083ed778021b89d5ba34f2e8ff3055e /mesonbuild/backend/vs2010backend.py | |
parent | 695b8f3a0377d3e2ce78ba8716adc365b18edea1 (diff) | |
download | meson-6089631a1b9cd5b9b4e75598721b53b9abc33950.zip meson-6089631a1b9cd5b9b4e75598721b53b9abc33950.tar.gz meson-6089631a1b9cd5b9b4e75598721b53b9abc33950.tar.bz2 |
Open build files with utf-8
Diffstat (limited to 'mesonbuild/backend/vs2010backend.py')
-rw-r--r-- | mesonbuild/backend/vs2010backend.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mesonbuild/backend/vs2010backend.py b/mesonbuild/backend/vs2010backend.py index e9a3519..3171451 100644 --- a/mesonbuild/backend/vs2010backend.py +++ b/mesonbuild/backend/vs2010backend.py @@ -227,7 +227,7 @@ class Vs2010Backend(backends.Backend): def generate_solution(self, sln_filename, projlist): default_projlist = self.get_build_by_default_targets() - with open(sln_filename, 'w') as ofile: + with open(sln_filename, 'w', encoding='utf-8') as ofile: ofile.write('Microsoft Visual Studio Solution File, Format ' 'Version 11.00\n') ofile.write('# Visual Studio ' + self.vs_version + '\n') @@ -575,7 +575,7 @@ class Vs2010Backend(backends.Backend): tree.write(ofname, encoding='utf-8', xml_declaration=True) # ElementTree can not do prettyprinting so do it manually doc = xml.dom.minidom.parse(ofname) - with open(ofname, 'w') as of: + with open(ofname, 'w', encoding='utf-8') as of: of.write(doc.toprettyxml()) def gen_vcxproj(self, target, ofname, guid): @@ -1119,7 +1119,7 @@ if %%errorlevel%% neq 0 goto :VCEnd''' igroup = ET.SubElement(root, 'ItemGroup') rulefile = os.path.join(self.environment.get_scratch_dir(), 'regen.rule') if not os.path.exists(rulefile): - with open(rulefile, 'w') as f: + with open(rulefile, 'w', encoding='utf-8') as f: f.write("# Meson regen file.") custombuild = ET.SubElement(igroup, 'CustomBuild', Include=rulefile) message = ET.SubElement(custombuild, 'Message') |