Re: Ensuring 7 bit encoding

"Stephen J. Turnbull" <[email protected]>
Newsgroups gmane.comp.python.mime.devel
Message-ID <[email protected]>
R. David Murray writes:

 > >>> 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: ².
 > 
 > >>>
 > 
 > Since 8bit isn't technically us-ascii, I wonder if this is a bug.

This is a bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.