From 5aaf87249adcc82cde55afc0975b5ef7f450aaa4 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Tue, 24 Sep 2013 15:55:22 +0100 Subject: [PATCH 1/2] Fixed utf-8 handling in metadata. Having utf-8 in the commit metada (e.g author, commit message, files) triggers a decoding error: "UnicodeDecodeError: 'ascii' codec can't decode byte 0xd7 in position 42: ordinal not in range(128)" This is because the __unicode__ method of the Commit class, doesn't actually return an object of type 'unicode' although it should. --- irkerhook.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/irkerhook.py b/irkerhook.py index 4b243a2..b4a4164 100755 --- a/irkerhook.py +++ b/irkerhook.py @@ -88,7 +88,7 @@ class Commit: self.url = webview except IOError: self.url = "" - return self.template % self.__dict__ + return unicode(self.template % self.__dict__, "utf-8") class GenericExtractor: "Generic class for encapsulating data from a VCS." -- 1.8.1.5