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:
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
|
@ -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"):
|
||||
|
|
Loading…
Reference in New Issue