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/modules/dlang.py | |
parent | 28175bbee2c111cf41b80c97bbadd7dbabaa8990 (diff) | |
download | meson-3e396b3782813d36d46195564cd0e111422bcaf5.zip meson-3e396b3782813d36d46195564cd0e111422bcaf5.tar.gz meson-3e396b3782813d36d46195564cd0e111422bcaf5.tar.bz2 |
fix: Always explicitly set encoding for text files (fixes #8263)
Diffstat (limited to 'mesonbuild/modules/dlang.py')
-rw-r--r-- | mesonbuild/modules/dlang.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/modules/dlang.py b/mesonbuild/modules/dlang.py index e2a55b6..b6efc86 100644 --- a/mesonbuild/modules/dlang.py +++ b/mesonbuild/modules/dlang.py @@ -70,7 +70,7 @@ class DlangModule(ExtensionModule): config_path = os.path.join(args[1], 'dub.json') if os.path.exists(config_path): - with open(config_path, encoding='utf8') as ofile: + with open(config_path, encoding='utf-8') as ofile: try: config = json.load(ofile) except ValueError: @@ -108,7 +108,7 @@ class DlangModule(ExtensionModule): else: config[key] = value - with open(config_path, 'w', encoding='utf8') as ofile: + with open(config_path, 'w', encoding='utf-8') as ofile: ofile.write(json.dumps(config, indent=4, ensure_ascii=False)) def _call_dubbin(self, args, env=None): |