Python中文全攻略 中文乱码 输出中文乱码
插入数据库时,总是空,我做了如何操作,就好了。数据是采集过来的,程序是gbk编码 person_sql="insert into analyst(education_id,alys_name,alys_sex,alys_img,alys_inte,person_id,alys_ctime,org_id) select * from (select (select education_id from education where education_name='"+personInfo[6].decode('gbk').encode('utf-8')+"'),'"+personInfo[1][0]+"','"+personInfo[2][0]+"','"+img+"','"+chenxin+"',convert('"+person_id+"' using gbk) as person_id,now(),(select org_id from organ where inst_code='"+inst_code+"' limit 1) org_id ) t where t.person_...