From 1a09b3502dd2a00cd2812a1e13d6b00d6e1cf173 Mon Sep 17 00:00:00 2001 From: Daid Date: Fri, 9 Mar 2012 17:12:18 +0100 Subject: [PATCH] Save alteration files in UTF-8 --- SkeinPyPy_NewUI/newui/alterationPanel.py | 4 ++-- .../skeinforge_application/alterations/start.gcode | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/SkeinPyPy_NewUI/newui/alterationPanel.py b/SkeinPyPy_NewUI/newui/alterationPanel.py index 8ba15d0c..453cdd4d 100644 --- a/SkeinPyPy_NewUI/newui/alterationPanel.py +++ b/SkeinPyPy_NewUI/newui/alterationPanel.py @@ -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() diff --git a/SkeinPyPy_NewUI/skeinforge_application/alterations/start.gcode b/SkeinPyPy_NewUI/skeinforge_application/alterations/start.gcode index 44c2ba00..563b42f5 100644 --- a/SkeinPyPy_NewUI/skeinforge_application/alterations/start.gcode +++ b/SkeinPyPy_NewUI/skeinforge_application/alterations/start.gcode @@ -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! - -- 2.30.2