Antoine Pitrou <[email protected]> added the comment:

> Antoine, a news client could guess it because of the Content-Type:
> header field (in this example, it mentions charset="gb2312").
> Yet, articles without a Content-Type: header field exist in the
> wild...

Unless I'm mistaken, Content-Type should only apply to the body, not the
headers. Either the headers use UTF-8 (RFC 3977), or they should be
MIME-encoded. Everything else is undecodable.

> There is no way to always make the right guess, unfortunately.
> News clients try to do their best :-)

Well, a news client built on nntplib could also try to do its best :)

> Yes, I mean b"\xC9ric".  4 bytes.

Ok, perhaps we should allow bytes username and password.

----------

_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue10284>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to