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/scripts/vcstagger.py | |
| parent | 28175bbee2c111cf41b80c97bbadd7dbabaa8990 (diff) | |
| download | meson-3e396b3782813d36d46195564cd0e111422bcaf5.tar.gz | |
fix: Always explicitly set encoding for text files (fixes #8263)
Diffstat (limited to 'mesonbuild/scripts/vcstagger.py')
| -rw-r--r-- | mesonbuild/scripts/vcstagger.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mesonbuild/scripts/vcstagger.py b/mesonbuild/scripts/vcstagger.py index 64985f6d3..18cf5f7f0 100644 --- a/mesonbuild/scripts/vcstagger.py +++ b/mesonbuild/scripts/vcstagger.py @@ -22,15 +22,15 @@ def config_vcs_tag(infile: str, outfile: str, fallback: str, source_dir: str, re except Exception: new_string = fallback - with open(infile, encoding='utf8') as f: + with open(infile, encoding='utf-8') as f: new_data = f.read().replace(replace_string, new_string) if os.path.exists(outfile): - with open(outfile, encoding='utf8') as f: + with open(outfile, encoding='utf-8') as f: needs_update = (f.read() != new_data) else: needs_update = True if needs_update: - with open(outfile, 'w', encoding='utf8') as f: + with open(outfile, 'w', encoding='utf-8') as f: f.write(new_data) |
