jaraco/path.py — pull request #76 by gazpachoking (2014-09-23 01:46:29+00:00)
Title: Fully support surrogate escaping with python 2

Currently there is partial support for the python 3 surrogate escaping when reading names from the file.system which were not encoded in the declared filesystem encoding in python 2. The problem with this support is that it is unable to encode the file names back to the original bytes in order to take any action on said files/directories. This pull aims to fix that, and allow the same support for these 'invalid' file names on python 2 as we currently have for python 3.

Currently unfinished, but added a test that passes on python 3 and fails on python 2.