New submission from R. David Murray <rdmur...@bitdance.com>: The following produces a non-conformant message, since the us-ascii charset is strictly 7bit:
>>> import email.message >>> m = email.message.Message() >>> m.set_payload("""A few lines ... of 8-bit text ... ... One high bit character: ². ... """, 'us-ascii') >>> print m.as_string() MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8bit A few lines of 8-bit text One high bit character: ². >>> ---------- components: Library (Lib) messages: 95133 nosy: r.david.murray priority: normal severity: normal stage: test needed status: open title: email.message.Message.set_payload and as_string given charset 'us-ascii' plus 8bit data produces invalid message type: behavior versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue7304> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com