Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Urllib quote strange behaviour
(Pdb) result
u'/ci-test-site/Shared Documents/v2/no such+\u2603'
(Pdb) urllib.quote(result.encode('utf-8'), safe=b'/+')
*** UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 42: ordinal not in range(128)
(Pdb) urllib.quote(result.encode('utf-8'), safe=b'+/')
(Pdb) urllib.quote(result.encode('utf-8'), safe=b'/')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.