Peace, friends,
You're mixing things up: serialization (pickling) gives you a binary representation of any Python object, Unicode text included.
If you open a file in text mode, and tell Python that it contains text encoded as UTF-8, then obviously you shouldn't be writing binary data (byte arrays, "bytes" in Python 3), such as pickled stuff, to it.
Put your pickles in a binary file. What you...
Leave a comment: