8764: [Compare Individual Events :Tool ]

Selecting "Save" causes a UnicodeEncodeError error
This commit is contained in:
Josip 2015-07-29 04:28:19 +02:00
parent 5d86e44264
commit f96df5658c
2 changed files with 2 additions and 1 deletions

View File

@ -341,7 +341,7 @@ class ODSTab(TabbedDoc):
except: except:
raise ReportError(_("Could not create %s") % self.content_xml) raise ReportError(_("Could not create %s") % self.content_xml)
self.f = open(self.content_xml,"w") self.f = open(self.content_xml,"w", encoding='utf-8')
self.f.write( self.f.write(
'<?xml version="1.0" encoding="UTF-8"?>\n' + '<?xml version="1.0" encoding="UTF-8"?>\n' +
'<office:document-content ' + '<office:document-content ' +

View File

@ -391,6 +391,7 @@ class DisplayChart(ManagedWindow):
def on_write_table(self, obj): def on_write_table(self, obj):
f = Gtk.FileChooserDialog(_("Select filename"), f = Gtk.FileChooserDialog(_("Select filename"),
parent=self.window,
action=Gtk.FileChooserAction.SAVE, action=Gtk.FileChooserAction.SAVE,
buttons=(_('_Cancel'), buttons=(_('_Cancel'),
Gtk.ResponseType.CANCEL, Gtk.ResponseType.CANCEL,