[issue1368247] unicode in email.MIMEText and email/Charset.py

2010-06-02 Thread R. David Murray
R. David Murray added the comment: OK, py3k now passes all but one of the tests, and I've disabled that one pending email6 since fixing it would break backward compatibility within the 3.x series. The fix is different, doing the encoding to output_charset just before calling base64mime. Thi

[issue1368247] unicode in email.MIMEText and email/Charset.py

2010-06-02 Thread R. David Murray
R. David Murray added the comment: Committed to 2.7 in r81658 and 2.6 in r81659. I'm leaving this open for the moment because while py3 doesn't have this problem, the tests should still pass and they don't. -- stage: patch review -> committed/rejected versions: -Python 2.6, Python 2

[issue1368247] unicode in email.MIMEText and email/Charset.py

2010-06-01 Thread R. David Murray
R. David Murray added the comment: Ah, it's not 100% true that it doesn't change "working" behavior. Before the patch, the first example in this ticket doesn't raise an error until the as_string call. After this patch, the error is raised as soon as MIMEText is called without the charset pa

[issue1368247] unicode in email.MIMEText and email/Charset.py

2010-06-01 Thread R. David Murray
Changes by R. David Murray : Added file: http://bugs.python.org/file17513/mimetext_unicode_input.patch ___ Python tracker ___ ___ Python-bug

[issue1368247] unicode in email.MIMEText and email/Charset.py

2010-06-01 Thread R. David Murray
Changes by R. David Murray : Removed file: http://bugs.python.org/file17512/mimetext_unicode_input.patch ___ Python tracker ___ ___ Python-b

[issue1368247] unicode in email.MIMEText and email/Charset.py

2010-06-01 Thread R. David Murray
R. David Murray added the comment: I don't think either of the previous patches are correct. I found a note in Issue1685453 that Barry would like for this to work, and after poking around in the code for a bit I think it can be done without breaking anything. Attached is a patch that adds un

[issue1368247] unicode in email.MIMEText and email/Charset.py

2010-05-05 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- assignee: barry -> r.david.murray ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue1368247] unicode in email.MIMEText and email/Charset.py

2010-04-28 Thread Senthil Kumaran
Senthil Kumaran added the comment: Hi David, The attached patch for this issue: +if isinstance(payload, unicode): +payload = payload.encode(msg.get_charset().output_charset or 'us-ascii') looks fine enough to me. Are you worried about the /or 'us-ascii'/ part of this patc

[issue1368247] unicode in email.MIMEText and email/Charset.py

2010-04-12 Thread Shashwat Anand
Shashwat Anand added the comment: After applying maxua's patch we do not get the unicode error but as david stated the support is not there. Here is the test. >>> import email >>> msg = >>> email.MIMEText.MIMEText(u'\u043a\u0438\u0440\u0438\u043b\u0438\u0446\u0430') >>> msg.set_charset('utf8'

[issue1368247] unicode in email.MIMEText and email/Charset.py

2009-05-05 Thread R. David Murray
R. David Murray added the comment: It looks to me like MIMEText doesn't actually support unicode input. . One way to get the example to work is to do this: MIMEText(u'\u043a\u0438\u0440\u0438\u043b\u0438\u0446\u0430'.encode('utf-8'), 'plain', 'utf-8') The above call produces valid output f

[issue1368247] unicode in email.MIMEText and email/Charset.py

2009-05-05 Thread Ben Gamari
Ben Gamari added the comment: What is the status of this? -- nosy: +bgamari ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue1368247] unicode in email.MIMEText and email/Charset.py

2008-12-02 Thread Damjan Georgievski
Damjan Georgievski <[EMAIL PROTECTED]> added the comment: The patch by maxua works fine with 2.6 too and solves the problem. I'd suggest it be applied to the 2.6 branch, even if email is rewriten for 2.7/3.x. ___ Python tracker <[EMAIL PROTECTED]>

[issue1368247] unicode in email.MIMEText and email/Charset.py

2008-12-02 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: It was proposed to rewrite MIMEText in Python 3.1 (and 2.7?) to use unicode characters in the internals and reconvert to bytes to send it to a socket (or a file). ___ Python tracker <[EMAIL PROTECTED]>

[issue1368247] unicode in email.MIMEText and email/Charset.py

2008-12-02 Thread STINNER Victor
Changes by STINNER Victor <[EMAIL PROTECTED]>: -- nosy: +haypo ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Python-bugs-list mailin

[issue1368247] unicode in email.MIMEText and email/Charset.py

2008-12-02 Thread maxua
maxua <[EMAIL PROTECTED]> added the comment: How about this version? -- nosy: +maxua Added file: http://bugs.python.org/file12190/mimetext-unicode.patch ___ Python tracker <[EMAIL PROTECTED]> _