Save alteration files in UTF-8

This commit is contained in:
Daid 2012-03-09 17:12:18 +01:00
parent 33015f068a
commit 1a09b3502d
2 changed files with 2 additions and 3 deletions

View file

@ -32,11 +32,11 @@ class alterationPanel(wx.Panel):
self.currentFile = self.list.GetSelection()
def loadFile(self, filename):
self.textArea.SetValue(settings.getAlterationFile(filename, False))
self.textArea.SetValue(unicode(settings.getAlterationFile(filename, False), "utf-8"))
def OnFocusLost(self, e):
if self.currentFile == self.list.GetSelection():
filename = os.path.join(archive.getSkeinforgePath('alterations'), self.alterationFileList[self.list.GetSelection()])
f = open(filename, "wb")
f.write(self.textArea.GetValue())
f.write(self.textArea.GetValue().encode("utf-8"))
f.close()

View file

@ -19,4 +19,3 @@ G92 E0 ;zero the extruded length again
G1 X100 Y100 F3500 ;go to the middle of the platform
G1 Z0.0 F400 ;back to Z=0 and start the print!