I have unicode-like strings but with slash escaped. For example, '\\u000D'. I need to decode them as normal strings. The above example should be convert to '\r' which '\u000D' corresponds to.
the same result without codecs - '\\u000D'.encode('ascii').decode('unicode-escape') or with other encoding '\\u000D'.encode('utf-8').decode('unicode-escape')