encc = ""
def zh2unicode(stri):
"""Auto converter encodings to unicode
global encc
for c in ('utf-8', 'gbk', 'big5', 'jp', 'euc_kr','utf16','utf32'):
encc = c
try:
return stri.decode(c)
except:
pass
encc = 'unk'
return stri
encc = ""
def zh2unicode(stri):
"""Auto converter encodings to unicode
No comments:
Post a Comment