fix for unicode, ask to use utf-8 encoding

This commit is contained in:
Rushabh Mehta 2011-08-11 13:32:20 +05:30
parent aee16cdfdc
commit 1fc02c1887

View file

@ -295,7 +295,10 @@ def cstr(s):
s = s.encode('utf-8', 'ignore')
except:
pass
return unicode(s, 'utf-8')
try:
return unicode(s)
except UnicodeDecodeError:
return unicode(s, 'utf-8')
def str_esc_quote(s):
"""