From 3e396b3782813d36d46195564cd0e111422bcaf5 Mon Sep 17 00:00:00 2001 From: Daniel Mensinger Date: Tue, 22 Jun 2021 22:59:16 +0200 Subject: fix: Always explicitly set encoding for text files (fixes #8263) --- mesonbuild/compilers/cs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mesonbuild/compilers/cs.py') diff --git a/mesonbuild/compilers/cs.py b/mesonbuild/compilers/cs.py index 218942c08..7ebb66def 100644 --- a/mesonbuild/compilers/cs.py +++ b/mesonbuild/compilers/cs.py @@ -87,7 +87,7 @@ class CsCompiler(BasicLinkerIsCompilerMixin, Compiler): src = 'sanity.cs' obj = 'sanity.exe' source_name = os.path.join(work_dir, src) - with open(source_name, 'w') as ofile: + with open(source_name, 'w', encoding='utf-8') as ofile: ofile.write(textwrap.dedent(''' public class Sanity { static public void Main () { -- cgit v1.2.3