[issue39454] when \\u in byte_string , byte_string.decode('raw_unicode_escape') maybe has problem

2020-01-25 Thread SilentGhost
SilentGhost added the comment: Why are you using this type of encoding on this bytes object? It specifically says in its description that "Existing backslashes are not escaped in any way.". If you'd use unicode_escape instead, you would be able to round-trip back to your original string.

[issue39454] when \\u in byte_string , byte_string.decode('raw_unicode_escape') maybe has problem

2020-01-25 Thread YPf
New submission from YPf : >>> path=r'C:\Users\Administrator\Desktop' >>> path.encode('raw_unicode_escape') b'C:\\Users\\Administrator\\Desktop' >>> path.encode('raw_unicode_escape').decode('raw_unicode_escape') Traceback (most recent call last): File "", line 1, in