diff options
| author | Daniel Mensinger <daniel@mensinger-ka.de> | 2021-06-22 22:59:16 +0200 |
|---|---|---|
| committer | Daniel Mensinger <daniel@mensinger-ka.de> | 2021-06-29 11:28:08 +0200 |
| commit | 3e396b3782813d36d46195564cd0e111422bcaf5 (patch) | |
| tree | f315e990f71984745fcb8f22dac2f0e400fecadb /mesonbuild/compilers/rust.py | |
| parent | 28175bbee2c111cf41b80c97bbadd7dbabaa8990 (diff) | |
| download | meson-3e396b3782813d36d46195564cd0e111422bcaf5.tar.gz | |
fix: Always explicitly set encoding for text files (fixes #8263)
Diffstat (limited to 'mesonbuild/compilers/rust.py')
| -rw-r--r-- | mesonbuild/compilers/rust.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/compilers/rust.py b/mesonbuild/compilers/rust.py index 6a7bd04ff..2b566c8b9 100644 --- a/mesonbuild/compilers/rust.py +++ b/mesonbuild/compilers/rust.py @@ -65,7 +65,7 @@ class RustCompiler(Compiler): def sanity_check(self, work_dir: str, environment: 'Environment') -> None: source_name = os.path.join(work_dir, 'sanity.rs') output_name = os.path.join(work_dir, 'rusttest') - with open(source_name, 'w') as ofile: + with open(source_name, 'w', encoding='utf-8') as ofile: ofile.write(textwrap.dedent( '''fn main() { } |
