py3: Draft: string / unicode:

issue 0000995
- use optional argument to get unicode from translation in python2
- add a utf8_decode function to get unicode from string, bytes, unicode
This commit is contained in:
looooo
2017-06-20 00:38:36 +02:00
committed by wmayer
parent 0f199064f3
commit 10866d38d3
9 changed files with 79 additions and 50 deletions

View File

@@ -126,7 +126,7 @@ def export(exportList,filename):
outfile = pythonopen(filename,"wb")
outfile.write(html)
outfile.close()
FreeCAD.Console.PrintMessage(translate("Arch","successfully written ").decode("utf8")+filename+"\n")
FreeCAD.Console.PrintMessage(translate("Arch","successfully written ", utf8_decode=True)+filename+"\n")
def getHTML(objectsList):
"returns the complete HTML code of a viewer for the given objects"