From a0c52f811d033b2fb0c7680de378a8fd12090e46 Mon Sep 17 00:00:00 2001 From: pazz Date: Sat, 16 Jul 2011 11:27:34 +0100 Subject: unicode in headers.. api needs to change: header fields are stored as utf-8 so we can convert stuff on api level. For now this fixes it. issue #46 --- alot/db.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'alot/db.py') diff --git a/alot/db.py b/alot/db.py index 3c16195a..6ea7cd92 100644 --- a/alot/db.py +++ b/alot/db.py @@ -303,7 +303,8 @@ class Message: self._thread = thread self._datetime = datetime.fromtimestamp(msg.get_date()) self._filename = msg.get_filename() - self._from = msg.get_header('From') + # TODO: change api to return unicode + self._from = msg.get_header('From').decode(DB_ENC) self._email = None # will be read upon first use self._attachments = None # will be read upon first use self._tags = set(msg.get_tags()) -- cgit v1.2.3