From 71606352eee50beea049eacdc19f91b9b9a1daaa Mon Sep 17 00:00:00 2001 From: Jonathan Wiedemann Date: Wed, 18 May 2016 15:31:10 +0200 Subject: [PATCH 1/3] add decode utf8 importOBJ.py --- src/Mod/Arch/importOBJ.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Mod/Arch/importOBJ.py b/src/Mod/Arch/importOBJ.py index cb8b6bf33..cfefd2843 100644 --- a/src/Mod/Arch/importOBJ.py +++ b/src/Mod/Arch/importOBJ.py @@ -53,11 +53,11 @@ def getIndices(shape,offset): if not isinstance(e.Curve,Part.Line): if not curves: curves = shape.tessellate(1) - FreeCAD.Console.PrintWarning(translate("Arch","Found a shape containing curves, triangulating\n")) + FreeCAD.Console.PrintWarning(translate("Arch","Found a shape containing curves, triangulating\n").decode('utf8')) break except: # unimplemented curve type curves = shape.tessellate(1) - FreeCAD.Console.PrintWarning(translate("Arch","Found a shape containing curves, triangulating\n")) + FreeCAD.Console.PrintWarning(translate("Arch","Found a shape containing curves, triangulating\n").decode('utf8')) break if curves: for v in curves[0]: @@ -124,7 +124,7 @@ def export(exportList,filename): for f in flist: outfile.write("f" + f + "\n") outfile.close() - FreeCAD.Console.PrintMessage(translate("Arch","successfully written ")+filename+"\n") + FreeCAD.Console.PrintMessage(translate("Arch","successfully written ").decode('utf8')+filename+"\n") From 9ef4a2e21b43110e05ba27cccc375a723888a33f Mon Sep 17 00:00:00 2001 From: Jonathan Wiedemann Date: Wed, 18 May 2016 17:20:29 +0200 Subject: [PATCH 2/3] add decode utf8 PathMachine.py --- src/Mod/Path/PathScripts/PathMachine.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Path/PathScripts/PathMachine.py b/src/Mod/Path/PathScripts/PathMachine.py index 614314cb8..8465c35ee 100644 --- a/src/Mod/Path/PathScripts/PathMachine.py +++ b/src/Mod/Path/PathScripts/PathMachine.py @@ -109,7 +109,7 @@ class Machine: class _ViewProviderMachine: def __init__(self,vobj): vobj.Proxy = self - vobj.addProperty("App::PropertyBool","ShowLimits","Path",translate("ShowMinMaxTravel","Switch the machine max and minimum travel bounding box on/off")) + vobj.addProperty("App::PropertyBool","ShowLimits","Path",translate("ShowMinMaxTravel","Switch the machine max and minimum travel bounding box on/off".decode("utf8"))) mode = 2 vobj.setEditorMode('LineWidth',mode) vobj.setEditorMode('MarkerColor',mode) From 0f88536d4233e1a87ef9111a6df707838a0a3efe Mon Sep 17 00:00:00 2001 From: Jonathan Wiedemann Date: Wed, 18 May 2016 17:25:54 +0200 Subject: [PATCH 3/3] add decode utf8 importWebGL.py --- src/Mod/Arch/importWebGL.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Arch/importWebGL.py b/src/Mod/Arch/importWebGL.py index 759f9db7d..1b72571d4 100644 --- a/src/Mod/Arch/importWebGL.py +++ b/src/Mod/Arch/importWebGL.py @@ -117,7 +117,7 @@ def export(exportList,filename): outfile = pythonopen(filename,"wb") outfile.write(html) outfile.close() - FreeCAD.Console.PrintMessage(translate("Arch","successfully written ")+filename+"\n") + FreeCAD.Console.PrintMessage(translate("Arch","successfully written ").decode("utf8")+filename+"\n") def getHTML(objectsList): "returns the complete HTML code of a viewer for the given objects"