[issue8054] "as_string" method in email's mime objects encode text segmentedly

2010-03-05 Thread R. David Murray
R. David Murray added the comment: We don't fully support setting defaultencoding to anything other than ASCII. The test suite doesn't fully pass, for example, if defaultencoding is set to 'utf-8' in site.py. But that aside, the documentation for MIMEText says: "No guessing or encoding is p

[issue8054] "as_string" method in email's mime objects encode text segmentedly

2010-03-04 Thread Dongying Zhang
Dongying Zhang added the comment: Hello R. David Murray: Thanks for your care. The examples I given both in message and file is just the same. You got the 'UnicodeEncodeError' because your system default encoding is ascii. The declaration of encoding at the top didn't help with this situatio

[issue8054] "as_string" method in email's mime objects encode text segmentedly

2010-03-04 Thread R. David Murray
R. David Murray added the comment: Using python 2.6.4, your first example gives me an error: UnicodeEncodeError: 'ascii' codec can't encode characters in position 11-18: ordinal not in range(128) while your second example works, as you indicated. So, at the moment I can not reproduce the bug

[issue8054] "as_string" method in email's mime objects encode text segmentedly

2010-03-04 Thread Dongying Zhang
New submission from Dongying Zhang : The as_string method in mime classes in module email.mime use base64 to encode the text, but segmentedly while the text contents non-acsii characters and is in type of unicode. This behavior confuse some of the email servers. For example: ===