GNOME Bugzilla – Bug 726116
UnicodeDecodeError traceback prevents file diff from occurring
Last modified: 2014-05-23 20:44:42 UTC
Created attachment 271532 [details] screenshot $ meld . # The ui in the attached screenshot appears. # When double-clicking "mainwindow.py" to see the uncommitted changes diff: Traceback (most recent call last):
+ Trace 233314
self.append_diff(arg, **kwargs))
return self.append_filediff(paths, merge_output=merge_output)
doc = filediff.FileDiff(len(files))
self.set_num_panes(num_panes)
self.recompute_label()
self.label_text = (" — ").decode('utf8').join(shortnames)
What's really exciting here is that I don't know how we haven't seen this problem before. We are acting like gettext should be giving us unicode, but we've carelessly sabotaged that. One option is to remove all of our gettext imports from modules; we install _() as ugettext in the namespace. Another option is to merge my current Python 3 branch, which appears to (and should) fix this. I'll take a better look at options on the weekend. Unfortunately, I can't find a quick workaround for this, other than to use a language that doesn't have non-ascii in the relevant messages (so far just the "<unnamed>" string, though there may be others). Not a real solution obviously.
This is now fixed in HEAD, and the fix should survive the Python 3 transition as well. Thanks for the bug report.
*** Bug 730660 has been marked as a duplicate of this bug. ***