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?
I’ve found Python3’s open(filename, r, encoding=ascii, errors=surrogateescape) to be useful. How do I wrap
Share
That’s what TextIOWrapper does.