Plugins/VcsPlugins/vcsPySvn/SvnDiffDialog.py

changeset 45
9a18f4dbb493
parent 13
1af94a91f439
child 53
c3eb7cc1ff8b
equal deleted inserted replaced
44:fe5cd20cb0eb 45:9a18f4dbb493
343 if res != QMessageBox.Save: 343 if res != QMessageBox.Save:
344 return 344 return
345 fname = Utilities.toNativeSeparators(fname) 345 fname = Utilities.toNativeSeparators(fname)
346 346
347 try: 347 try:
348 f = open(fname, "w") 348 f = open(fname, "w", encoding = "utf-8")
349 f.write(self.contents.toPlainText()) 349 f.write(self.contents.toPlainText())
350 f.close() 350 f.close()
351 except IOError as why: 351 except IOError as why:
352 QMessageBox.critical(self, self.trUtf8('Save Diff'), 352 QMessageBox.critical(self, self.trUtf8('Save Diff'),
353 self.trUtf8('<p>The patch file <b>{0}</b> could not be saved.' 353 self.trUtf8('<p>The patch file <b>{0}</b> could not be saved.'

eric ide

mercurial