mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Set encoding correctly when opening files everywhere
Otherwise the encoding is interpreted differently on Windows and Mac.
This commit is contained in:
parent
c779795618
commit
54a03723ab
8 changed files with 13 additions and 13 deletions
|
@ -249,11 +249,11 @@ class VersionUpgrade25to26(VersionUpgrade):
|
|||
definition_changes_dir = Resources.getPath(CuraApplication.ResourceTypes.DefinitionChangesContainer)
|
||||
user_settings_dir = Resources.getPath(CuraApplication.ResourceTypes.UserInstanceContainer)
|
||||
|
||||
with open(os.path.join(definition_changes_dir, definition_changes_filename), "w") as f:
|
||||
with open(os.path.join(definition_changes_dir, definition_changes_filename), "w", encoding = "utf-8") as f:
|
||||
f.write(definition_changes_output.getvalue())
|
||||
with open(os.path.join(user_settings_dir, user_settings_filename), "w") as f:
|
||||
with open(os.path.join(user_settings_dir, user_settings_filename), "w", encoding = "utf-8") as f:
|
||||
f.write(user_settings_output.getvalue())
|
||||
with open(os.path.join(extruder_stack_dir, extruder_filename), "w") as f:
|
||||
with open(os.path.join(extruder_stack_dir, extruder_filename), "w", encoding = "utf-8") as f:
|
||||
f.write(extruder_output.getvalue())
|
||||
|
||||
## Creates a definition changes container which doesn't contain anything for the Custom FDM Printers.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue