R. David Murray added the comment: No, it is introducing the unicode that is the problem. Your first example is entirely binary. It is only when you *mix* binary and unicode that you have encoding problems (because python doesn't know the encoding of the binary data...well, more precisely it doesn't have one).
This confusion is a large part of why python3 exists :) ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue22767> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com