diff --git a/scripts/git-hooks/pre-commit-python.hook b/scripts/git-hooks/pre-commit-python.hook index 15ed76566f..f97894be99 100755 --- a/scripts/git-hooks/pre-commit-python.hook +++ b/scripts/git-hooks/pre-commit-python.hook @@ -40,7 +40,7 @@ def copy_files_to_tmp_dir(files): filepath = os.path.dirname(filename) if not os.path.exists(filepath): os.makedirs(filepath) - with open(filename, 'w') as f: + with open(filename, 'w', encoding="utf-8") as f: system('git', 'show', ':' + name, stdout=f) return tempdir