I am familiar with urlencode
, which encodes a dictionary of parameters. How would I encode a string such as the following to a url-safe string?
s = 'http://google.com/search?q='
+ 'パイレーツ・オブ・カリビアン/呪われた海賊たち(日本語吹替版)'
+ ' '
+ 'site:imdb.com/title'
urlencoded_str = ?