This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2009年11月10日 22:32 by r.david.murray, last changed 2022年04月11日 14:56 by admin.
| Messages (2) | |||
|---|---|---|---|
| msg95133 - (view) | Author: R. David Murray (r.david.murray) * (Python committer) | Date: 2009年11月10日 22:32 | |
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: 2.
... """, '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: 2.
>>>
|
|||
| msg156629 - (view) | Author: R. David Murray (r.david.murray) * (Python committer) | Date: 2012年03月23日 01:55 | |
In Python2 the fix would be to use charset unknown-8bit instead of us-ascii. In Python3 this actually puts unicode in the message body. There we should default to utf-8, but this requires a more extensive change than the Python2 change, and probably should not be backported. Once this is fixed in Python3 the utf-8 default check can be removed from MIMEText (issue 14380). |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:56:54 | admin | set | github: 51553 |
| 2012年06月06日 08:33:05 | mitya57 | set | nosy:
+ mitya57 |
| 2012年05月24日 14:51:48 | r.david.murray | set | assignee: r.david.murray -> components: + email, - Library (Lib) |
| 2012年03月23日 01:55:44 | r.david.murray | set | messages:
+ msg156629 versions: + Python 3.3, - Python 3.1 |
| 2012年03月23日 01:33:36 | r.david.murray | set | assignee: r.david.murray |
| 2010年07月11日 10:20:55 | BreamoreBoy | set | nosy:
+ barry versions: - Python 2.6 |
| 2009年11月10日 22:32:46 | r.david.murray | create | |