Message156498
| Author |
mitya57 |
| Recipients |
barry, mitya57, r.david.murray |
| Date |
2012年03月21日.17:04:59 |
| SpamBayes Score |
5.5401773e-07 |
| Marked as misclassified |
No |
| Message-id |
<1332349500.19.0.692682334464.issue14360@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
> In fact, there's really no reason to call an encode_ method at all, since if you pass a string to MIMEText when giving it a non-ascii unicode string, it will default to utf-8 and do the appropriate CTE encoding.
No, it doesn't:
Python 3.2.3rc1 (default, Mar 9 2012, 23:02:43)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from email.mime.text import MIMEText
>>> print(MIMEText('йцукен'))
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
йцукен
>>>
As you can see, it leaves russian text in unmodified state and sets the charset to "us-ascii". Should it be considered as a bug?
> What is your use case, by the way?
I'm writing a "send via e-mail" plugin for my ReText editor (http://retext.sourceforge.net/). |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2012年03月21日 17:05:00 | mitya57 | set | recipients:
+ mitya57, barry, r.david.murray |
| 2012年03月21日 17:05:00 | mitya57 | set | messageid: <1332349500.19.0.692682334464.issue14360@psf.upfronthosting.co.za> |
| 2012年03月21日 17:04:59 | mitya57 | link | issue14360 messages |
| 2012年03月21日 17:04:59 | mitya57 | create |
|