[meld] patchdialog: Encode created patches to UTF-8



commit 040f37f2be7319a29cb4a7d41da632963f699264
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Tue Dec 23 06:23:19 2014 +1000

    patchdialog: Encode created patches to UTF-8
    
    An alternative approach would be to reuse the encoding of the original
    files. If we did that, we'd need to handle this better, including
    adding a confirmation dialog and fallback. In the end, this is sane and
    probably no one cares that much.

 meld/patchdialog.py |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/meld/patchdialog.py b/meld/patchdialog.py
index 81e5279..c6c3d8e 100644
--- a/meld/patchdialog.py
+++ b/meld/patchdialog.py
@@ -118,6 +118,7 @@ class PatchDialog(gnomeglade.Component):
                 filename = self.filediff._get_filename_for_saving(
                     _("Save Patch"))
                 if filename:
+                    txt = txt.encode('utf-8')
                     self.filediff._save_text_to_filename(filename, txt)
                     break
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]