Assorted bugfixes to get reworked be-handle-mail working.
authorW. Trevor King <wking@drexel.edu>
Sat, 18 Jul 2009 21:02:11 +0000 (17:02 -0400)
committerW. Trevor King <wking@drexel.edu>
Tue, 20 Mar 2012 21:20:08 +0000 (17:20 -0400)
interfaces/email/interactive/send_pgp_mime.py

index 3a60013f4742849769db3adaa7a0a97c4d9d0caf..babd720a77dc0eaae7f1a58e50b7822319a50ab2 100644 (file)
@@ -212,7 +212,7 @@ def flatten(msg, to_unicode=False):
     g.flatten(msg)
     text = fp.getvalue()
     if to_unicode == True:
-        encoding = msg.get_content_charset()
+        encoding = msg.get_content_charset() or "utf-8"
         text = unicode(text, encoding=encoding)
     return text