Skip to content

surrogateescape documentation #116

@abadger

Description

@abadger

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions