Fix T50926: python crashes with path containing utf8 characters.

Default text encoding is platform-dependent in python, and windows
usually do not use utf-8 as default...
This commit is contained in:
Bastien Montagne 2017-03-14 16:04:03 +01:00
parent da6cd77628
commit 43f7d5643f
Notes: blender-bot 2023-02-14 09:44:56 +01:00
Referenced by issue #50926, python crashes with path containing utf8 characters
1 changed files with 1 additions and 1 deletions

View File

@ -135,7 +135,7 @@ class AddPresetBase:
file_preset.write("%s = %r\n" % (rna_path_step, value))
file_preset = open(filepath, 'w')
file_preset = open(filepath, 'w', encoding="utf-8")
file_preset.write("import bpy\n")
if hasattr(self, "preset_defines"):