#转码 def utf2gbk(string): #return string s=string.decode('utf-8','ignore').encode('gb18030','ignore') if s!=None: return s else: return string