Nick Coghlan added the comment: Ah, you're right - peeking into the underlying buffer would be enough to handle encoding detection. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue15216> _______________________________________