[Pkg-bazaar-commits] ./bzr-gtk/unstable r76: Replace non-UTF8 characters rather than generating an exception (fixes #44677).

Jelmer Vernooij jelmer at samba.org
Fri Apr 10 07:49:05 UTC 2009


------------------------------------------------------------
revno: 76
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: bzr-gtk
timestamp: Mon 2006-08-21 16:02:07 +0200
message:
  Replace non-UTF8 characters rather than generating an exception (fixes #44677).
modified:
  viz/diffwin.py
-------------- next part --------------
=== modified file 'viz/diffwin.py'
--- a/viz/diffwin.py	2006-08-21 13:42:50 +0000
+++ b/viz/diffwin.py	2006-08-21 14:02:07 +0000
@@ -14,6 +14,7 @@
 
 import gtk
 import pango
+import sys
 
 try:
     import gtksourceview
@@ -171,4 +172,4 @@
 
         s = StringIO()
         show_diff_trees(self.parent_tree, self.rev_tree, s, specific_files)
-        self.buffer.set_text(s.getvalue())
+        self.buffer.set_text(s.getvalue().decode(sys.getdefaultencoding(), 'replace'))



More information about the Pkg-bazaar-commits mailing list