-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UnicodeDecodeError when trying to reply to mail #9
Comments
This seems to do the trick. commit 853e9964906ec5fba8a1058e2a796c053deb771c
Author: Luke Macken <lmacken@redhat.com>
Date: Sun Aug 14 12:34:26 2011 -0400
Decode our author names to unicode before encoding to UTF-8 when replying
diff --git a/alot/command.py b/alot/command.py
index 711bfd8..f569bd0 100644
--- a/alot/command.py
+++ b/alot/command.py
@@ -476,7 +476,7 @@ class ReplyCommand(Command):
mail = self.message.get_email()
# set body text
mailcontent = '\nOn %s, %s wrote:\n' % (self.message.get_datestring(),
- self.message.get_author()[0])
+ self.message.get_author()[0].decode('utf-8'))
for line in self.message.accumulate_body().splitlines():
mailcontent += '>' + line + '\n'
|
ah yes, i remember this one: i deliberately removed this decode because spaetz agreed to Sent via Hubroid |
Great, sounds good to me! Ensuring that the API always returns unicode definitely is ideal, as my patch doesn't exactly fit the "decode early, encode late. unicode everywhere." methodology :) |
i'll close this here as spaetz has just pushed my patch |
I get the following traceback when trying to reply to a mail from someone with a non-ascii name.
The text was updated successfully, but these errors were encountered: