[issue22666] email.Header no encoding of unicode strings containing newlines

2020-05-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Python 2.7 is no longer supported. -- nosy: +serhiy.storchaka resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker

[issue22666] email.Header no encoding of unicode strings containing newlines

2014-11-27 Thread R. David Murray
R. David Murray added the comment: I'd have to double check, but I think having /r /n etc encoded in an encopded string is illegal per the rfcs. It should be, anyway. So IMO the bug is encoding them at all, but at this point we probably can't fix it for bacward compatibility reasons. I'm

[issue22666] email.Header no encoding of unicode strings containing newlines

2014-11-27 Thread Flavio Grossi
Flavio Grossi added the comment: Hi, and thank you for your answer. However this is not strictly related to the newline, but also to some small idiosyncrasies and different behavior among py2 and py3 (and even in py2 using Header() or Charset()): # py2.7, non-unicode str H('test',

[issue22666] email.Header no encoding of unicode strings containing newlines

2014-11-26 Thread Flavio Grossi
Flavio Grossi added the comment: any news? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22666 ___ ___ Python-bugs-list mailing list

[issue22666] email.Header no encoding of unicode strings containing newlines

2014-10-18 Thread Flavio Grossi
New submission from Flavio Grossi: When trying to encode an email header with a newline in it, correct encoding is done only for strings and not for unicode strings. In fact, for unicode strings, encoding is only done if a non ascii character is contained in it. The attached patch should fix