非utf8编码转换utf-8

strutf8 = teststr.encode('utf-8').decode('utf-8', 'ignore')

编程技巧