mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -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
|
@ -26,7 +26,7 @@ class GCodeReader(MeshReader):
|
|||
|
||||
# PreRead is used to get the correct flavor. If not, Marlin is set by default
|
||||
def preRead(self, file_name, *args, **kwargs):
|
||||
with open(file_name, "r") as file:
|
||||
with open(file_name, "r", encoding = "utf-8") as file:
|
||||
for line in file:
|
||||
if line[:len(self._flavor_keyword)] == self._flavor_keyword:
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue