Arch: small encoding fixes

This commit is contained in:
Yorik van Havre 2016-01-11 13:08:28 -02:00
parent cbad63100a
commit 86a1897eca
2 changed files with 4 additions and 3 deletions

View File

@ -22,9 +22,10 @@
#***************************************************************************
import FreeCAD,os
from PySide import QtCore, QtGui
if FreeCAD.GuiUp:
import FreeCADGui
from PySide import QtCore, QtGui
from DraftTools import translate
else:
def translate(ctxt,txt):

View File

@ -941,9 +941,9 @@ def export(exportList,filename):
val = "(".join(r[1:])
val = val.strip("'")
val = val.strip('"')
if DEBUG: print " property ",key," : ",str(val), " (", str(tp), ")"
if DEBUG: print " property ",key," : ",val.encode("utf8"), " (", str(tp), ")"
if tp in ["IfcLabel","IfcText","IfcIdentifier"]:
val = str(val)
val = val.encode("utf8")
elif tp == "IfcBoolean":
if val == ".T.":
val = True