Skip to content

Commit

Permalink
Draft: Fixed utf8 bug in shapestring
Browse files Browse the repository at this point in the history
  • Loading branch information
yorikvanhavre committed Jan 14, 2014
1 parent 96ff9e3 commit 6245957
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Mod/Draft/DraftGui.py
Expand Up @@ -1022,7 +1022,9 @@ def pickFile(self):
dialogCaption,
dialogDir,
dialogFilter)
fname = str(fname.toUtf8()) # QString to PyString
print fname
#fname = str(fname.toUtf8()) # QString to PyString
fname = fname[0].decode("utf8")
# print "debug: D_G DraftToolBar.pickFile type(fname): " str(type(fname))

except Exception as e:
Expand All @@ -1041,7 +1043,7 @@ def validateFile(self):
if self.sourceCmd:
if (self.labelFFile.isVisible()):
if self.FFileValue.text():
self.sourceCmd.validFFile(str(self.FFileValue.text().toUtf8())) #QString to PyString
self.sourceCmd.validFFile(self.FFileValue.text().decode("utf8")) #QString to PyString
else:
FreeCAD.Console.PrintMessage(translate("draft", "Please enter a font file."))

Expand Down

0 comments on commit 6245957

Please sign in to comment.