Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace string_escape with simple replacements
Holy mother of God. Making string_escape work across Python 2 and 3 is an absolute nightmare. The bytes-to-bytes encodes were removed in Python 3, so the only way to use them is to use unicode_escape directly from the codecs package, but this makes a complete hash of the task if you give it unicode: >>> codecs.decode('åéïò', 'unicode_escape') 'åéïò' >>> codecs.decode('åéïò'.encode('utf8'), 'unicode_escape') 'åéïò' WTF!? Anyway. Life is too short. This will make the tests pass. Fixes #128.
- Loading branch information