Éric Araujo added the comment: Ah, right, I missed the part about the file being opened in binary mode. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue17859> _______________________________________