more and more fixes

This commit is contained in:
Miroslav Stampar
2010-05-28 14:04:34 +00:00
parent 37590520c4
commit 0f5768cddf
3 changed files with 5 additions and 7 deletions

View File

@@ -95,9 +95,9 @@ def urlencode(string, safe=":/?%&=", convall=False):
return result
if convall:
result = urllib.quote(string)
result = urllib.quote(string.encode("utf-8")) #Reference: http://old.nabble.com/Re:-Problem:-neither-urllib2.quote-nor-urllib.quote-encode-the--unicode-strings-arguments-p19823144.html
else:
result = urllib.quote(string, safe)
result = urllib.quote(string.encode("utf-8"), safe)
return result