Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLipu Fei <lipu.fei815@gmail.com>2018-01-29 14:29:20 +0300
committerLipu Fei <lipu.fei815@gmail.com>2018-01-29 14:29:20 +0300
commit7dfc1a4aa717c00819bf0f11e714c1f93116b352 (patch)
tree97fc998715fe9eb943899bb3f42623e7d79af11c /cura_app.py
parent63ac8412e639e0fc6c959f076678c90fab527e0c (diff)
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.
Diffstat (limited to 'cura_app.py')
-rwxr-xr-xcura_app.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/cura_app.py b/cura_app.py
index 6d1ff6ab6b..b9afb9bbcc 100755
--- a/cura_app.py
+++ b/cura_app.py
@@ -30,8 +30,8 @@ if not known_args["debug"]:
if hasattr(sys, "frozen"):
dirpath = get_cura_dir_path()
os.makedirs(dirpath, exist_ok = True)
- sys.stdout = open(os.path.join(dirpath, "stdout.log"), "w")
- sys.stderr = open(os.path.join(dirpath, "stderr.log"), "w")
+ sys.stdout = open(os.path.join(dirpath, "stdout.log"), "w", encoding = "utf-8")
+ sys.stderr = open(os.path.join(dirpath, "stderr.log"), "w", encoding = "utf-8")
import platform
import faulthandler