I have strings like C%2B%2B_name.zip
which are supposed as url encoded. How to convert them to C++_name.zip
?
Py 3.x.
Asked
Active
Viewed 59 times
-1
2 Answers
1
For Python 3, you will need to use:
urllib.parse.unquote('C%2B%2B_name.zip')
See urllib.parse.unquote
.

Dan D.
- 73,243
- 15
- 104
- 123
-
Finally someone who read the question and provided a solution for Python 3. – Matthias Nov 18 '14 at 08:44
-
for 2 -3 or 3-2 sometimes make confusion, many thing changes :) – Hackaholic Nov 18 '14 at 08:54
0
All you need is URL library
import urllib
print urllib.unquote('C%2B%2B_name.zip')
and if you have names with other characters (not only English), then you can add .decode('utf8')

Salvador Dali
- 214,103
- 147
- 703
- 753