diff -r 191a568a2a17 -r 4f0e1d66bba5 PythonSTC.py --- a/PythonSTC.py Tue Mar 31 09:38:44 2009 +0200 +++ b/PythonSTC.py Sat Apr 04 10:43:29 2009 +0200 @@ -351,7 +351,7 @@ # Some methods to make it compatible with how the wxTextCtrl is used def SetValue(self, value): if wx.USE_UNICODE: - value = value.decode('iso8859_1') + value = value.decode('utf-8') self.SetText(value) self.EmptyUndoBuffer() self.SetSavePoint() @@ -544,7 +544,10 @@ self.SetSizer(self.box) self.sourceFile = None - + + self.Bind(wx.EVT_MENU, self.OnSave, id=wx.ID_SAVE) + accel = wx.AcceleratorTable([wx.AcceleratorEntry(wx.ACCEL_CTRL, 83, wx.ID_SAVE)]) + self.SetAcceleratorTable(accel) # Loads from a file object def LoadSourceFile(self, filename): @@ -578,7 +581,7 @@ return dlg.Destroy() - source = self.editor.GetText() + source = self.editor.GetText().encode("utf-8") f = file(self.sourceFile, "w") f.write(source)