diff --git a/wxPython/wx/tools/XRCed/globals.py b/wxPython/wx/tools/XRCed/globals.py index d99e823523..aa40525283 100644 --- a/wxPython/wx/tools/XRCed/globals.py +++ b/wxPython/wx/tools/XRCed/globals.py @@ -15,7 +15,7 @@ import sys # Global constants progname = 'XRCed' -version = '0.1.7-2' +version = '0.1.7-3' # Minimal wxWindows version MinWxVersion = (2,6,0) if wxVERSION[:3] < MinWxVersion: diff --git a/wxPython/wx/tools/XRCed/xrced.py b/wxPython/wx/tools/XRCed/xrced.py index 853c0abe96..461a72dbd4 100644 --- a/wxPython/wx/tools/XRCed/xrced.py +++ b/wxPython/wx/tools/XRCed/xrced.py @@ -416,7 +416,11 @@ class Frame(wxFrame): xxx = tree.GetPyData(selected) if wx.TheClipboard.Open(): data = wx.CustomDataObject('XRCED') - data.SetData(cPickle.dumps(xxx.element.toxml())) + # Set encoding in header + # (False,True) + s = (xxx.element.toxml(encoding=g.currentEncoding), + xxx.element.toxml())[not g.currentEncoding] + data.SetData(cPickle.dumps(s)) wx.TheClipboard.SetData(data) wx.TheClipboard.Close() self.SetStatusText('Copied') @@ -588,7 +592,10 @@ class Frame(wxFrame): if evt.GetId() == wxID_CUT: if wx.TheClipboard.Open(): data = wx.CustomDataObject('XRCED') - data.SetData(cPickle.dumps(elem.toxml())) + # (False, True) + s = (elem.toxml(encoding=g.currentEncoding), + elem.toxml())[not g.currentEncoding] + data.SetData(cPickle.dumps(s)) wx.TheClipboard.SetData(data) wx.TheClipboard.Close() else: