Message198226
Using BytesGenerator I get:
>>> fp = BytesIO()
>>> g = BytesGenerator(fp)
>>> msg = MIMENonMultipart('text', 'plain')
>>> msg.set_payload('А Б В Г Д Е Ж Ѕ З И І К Л М Н О П.', cs)
>>> g.flatten(msg)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.3/email/generator.py", line 112, in flatten
self._write(msg)
File "/usr/lib/python3.3/email/generator.py", line 177, in _write
self._dispatch(msg)
File "/usr/lib/python3.3/email/generator.py", line 203, in _dispatch
meth(msg)
File "/usr/lib/python3.3/email/generator.py", line 421, in _handle_text
super(BytesGenerator,self)._handle_text(msg)
File "/usr/lib/python3.3/email/generator.py", line 233, in _handle_text
self._write_lines(payload)
File "/usr/lib/python3.3/email/generator.py", line 158, in _write_lines
self.write(laststripped)
File "/usr/lib/python3.3/email/generator.py", line 395, in write
self._fp.write(s.encode('ascii', 'surrogateescape'))
UnicodeEncodeError: 'ascii' codec can't encode character '\u0410' in position 0: ordinal not in range(128)
But I might be using it wrong :/ |
|
Date |
User |
Action |
Args |
2013-09-21 22:05:22 | apollo13 | set | recipients:
+ apollo13, barry, r.david.murray |
2013-09-21 22:05:22 | apollo13 | set | messageid: <1379801122.13.0.170217598802.issue19063@psf.upfronthosting.co.za> |
2013-09-21 22:05:22 | apollo13 | link | issue19063 messages |
2013-09-21 22:05:21 | apollo13 | create | |
|