I got excited when I saw that python-future had surrogateescape support (something that is sorely missing in six). However, the documentation is mostly spotty about this and sometimes wrong.
- http://python-future.org/faq.html#which-versions-of-python-does-python-future-support Lists surrogateescape as a feature unimplemented on python2.6 but in my testing on a rhel6 box with python2.6.6 it seems to work.
- str(u'\udcff').encode('utf-8', 'surrogateescape') seems to work out of the box but bytes(b'\xff').decode('utf-8', 'surrogateescape') needs a prior call to future.utils.surrogateescape.register_surrogateescape() before it works.
This was all tested with future 0.14.1.
Reactions are currently unavailable
I got excited when I saw that python-future had surrogateescape support (something that is sorely missing in six). However, the documentation is mostly spotty about this and sometimes wrong.
This was all tested with future 0.14.1.