From accaf0b3bda55284aa2a25beeede01b6247768b0 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Fri, 28 May 2010 14:07:48 +0000 Subject: [PATCH] minor refactoring --- lib/core/convert.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/core/convert.py b/lib/core/convert.py index 0989431f0..351b2b0f8 100644 --- a/lib/core/convert.py +++ b/lib/core/convert.py @@ -95,9 +95,9 @@ def urlencode(string, safe=":/?%&=", convall=False): return result if convall: - 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 + result = urllib.quote(utf8encode(string)) #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.encode("utf-8"), safe) + result = urllib.quote(utf8encode(string), safe) return result