fix for unicode, ask to use utf-8 encoding
This commit is contained in:
parent
aee16cdfdc
commit
1fc02c1887
1 changed files with 4 additions and 1 deletions
|
|
@ -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):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue