How do I wrap Python 3's io.BytesIO() with surrogateescape decoding?
python-3.x, unicode
Solution
That's what TextIOWrapper does.
Problem
I've found Python3's `open("filename", "r", encoding="ascii", errors="surrogateescape")` to be useful. How do I wrap an `io.BytesIO()` (or any not-a-real-file source of bytes) to create a text-mode file-like object with the same decoding behavior?