nn wrote:
To be more informative I am both writing text and binary data together. That is I am embedding text from another source into stream that uses non-ascii characters as "control" characters. In Python2 I was processing it mostly as text containing a few "funny" characters.
OK. Then you need to be writing arrays of bytes, not strings. Encoding is your problem. This has nothing to do with Unicode. John Nagle -- http://mail.python.org/mailman/listinfo/python-list