Antoine Pitrou <pit...@free.fr> added the comment: Yes, unescaped utf-8 is explicitly allowed in headers by RFC 3977:
The content of a header SHOULD be in UTF-8. However, if an implementation receives an article from elsewhere that uses octets in the range 128 to 255 in some other manner, it MAY pass it to a client or server without modification. Therefore, implementations MUST be prepared to receive such headers, and data derived from them (e.g., in the responses from the OVER command, Section 8.3), and MUST NOT assume that they are always UTF-8. (I guess this means NNTP is now more modern than SMTP :-)). Actually, there's a test with an actual utf-8 header in the unit tests. (as for “implementations MUST be prepared to receive such headers, and data derived from them”, this is accounted for by using surrogateescape). ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9360> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com