summaryrefslogtreecommitdiff
path: root/alot/db.py
diff options
context:
space:
mode:
authorpazz <patricktotzke@gmail.com>2011-07-16 11:27:34 +0100
committerpazz <patricktotzke@gmail.com>2011-07-16 11:27:34 +0100
commita0c52f811d033b2fb0c7680de378a8fd12090e46 (patch)
treee21aaf503dbf0d9f5b1ba2cbbbc6c52c830bc57f /alot/db.py
parent8e2f701bc3d64edcdc2be1e6c65aef5bfdf9c3b0 (diff)
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
Diffstat (limited to 'alot/db.py')
-rw-r--r--alot/db.py3
1 files changed, 2 insertions, 1 deletions
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())