mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-12 01:07:52 -06:00
Add encoding='utf-8' for text file reading
CURA-4875 When encoding is not provided, the behaviour is system dependent and it can break on OS X.
This commit is contained in:
parent
63ac8412e6
commit
7dfc1a4aa7
8 changed files with 11 additions and 11 deletions
|
@ -486,7 +486,7 @@ class ContainerManager(QObject):
|
|||
container = container_type(container_id)
|
||||
|
||||
try:
|
||||
with open(file_url, "rt") as f:
|
||||
with open(file_url, "rt", encoding = "utf-8") as f:
|
||||
container.deserialize(f.read())
|
||||
except PermissionError:
|
||||
return { "status": "error", "message": "Permission denied when trying to read the file"}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue