mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -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
|
@ -57,7 +57,7 @@ class GCodeProfileReader(ProfileReader):
|
|||
# TODO: Consider moving settings to the start?
|
||||
serialized = "" # Will be filled with the serialized profile.
|
||||
try:
|
||||
with open(file_name, "r") as f:
|
||||
with open(file_name, "r", encoding = "utf-8") as f:
|
||||
for line in f:
|
||||
if line.startswith(prefix):
|
||||
# Remove the prefix and the newline from the line and add it to the rest.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue