Added send_pgp_mime.Mail.encodedMIMEText() for unicode handling.
authorW. Trevor King <wking@drexel.edu>
Sat, 18 Jul 2009 12:47:11 +0000 (08:47 -0400)
committerW. Trevor King <wking@drexel.edu>
Tue, 20 Mar 2012 21:18:45 +0000 (17:18 -0400)
commit6815fa63c28a467b91824320a76e9f1e3bb7a0b3
tree17349a7ec1389bd7a51ae74d3b63f0ce60b856f6
parent25e1078d121ec9bfc14c718c7b2da76ca1cc2a44
Added send_pgp_mime.Mail.encodedMIMEText() for unicode handling.

Now be-handle-mail handles examples/unicode without crashing
  cat examples/unicode | ./be-handle-mail -o -l -
But the output email is encoded in base64:

MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
From: BE Bugs <wking@thor.physics.drexel.edu>
To: John Doe <jdoe@example.com>
Date: Sat, 18 Jul 2009 12:22:05 +0000
Subject: [be-bug] Re: show
In-reply-to: <abcd@example.com>

UmVzdWx0cyBvZiBydW5uaW5nOiAoZXhpdCBjb2RlIDApCiAgc2hvdyAKCnN0ZG91dDoKCjw/eG1s
IHZlcnNpb249IjEuMCIgZW5jb2Rpbmc9IlVURi04IiA/Pgo8YnVnPgogIDx1dWlkPmY3Y2NkOTE2
LWI1YzctNDg5MC1hMmUzLThjOGFjZTE3YWUzYTwvdXVpZD4KICA8c2hvcnQtbmFtZT5mN2M8L3No
b3J0LW5hbWU+CiAgPHNldmVyaXR5Pm1pbm9yPC9zZXZlcml0eT4KICA8c3RhdHVzPmZpeGVkPC9z
...

This is perhaps the best we can get out of python < 3.1/2.7, see
  http://bugs.python.org/issue1368247
interfaces/email/interactive/send_pgp_mime.py