This topic has been archived. It cannot be replied.
-
工作学习 / 专业技术讨论 / 再请教个问题: MYSQL 是latin1的内码, 中文数据在里面是乱码, 页面gb2312显示则正常, 导出CSV EXCEL, 修改添加了一些数据再导入, 无论怎么导, 页面都显示乱码....请教有什么办法么?导入时用的
UTF8
CSV LOAD DATA
Fields terminated by ,
Fields enclosed by "
Fields escaped by \
Lines terminated by AUTO
Column names
Use LOCAL keyword
我导出的sql 再导入就没有问题, 用textpad看了一下, sql 和 csv都是 utf8的文件内码啊, 只是我在EXCEL里改了那么一改, 再导入就有问题了....
哪位DX给支个招儿吧! 谢谢!
-zzzboy(GOal-gOal);
2006-8-1
{341}
(#3115279@0)
-
i import to mysql use > source xx.sql; no problem with the chinese, all use default setting. the DB code is latin1( the default) too. The chinese chars can be displayed by phpmyadmin when phpmyadmin isset to use Chinese. And my php program can display Chinese words in browser.
i have use .csv to do import/export yet. May be u can check it file to make sure that the changed file still plain text without extra meta data.
-647i(流浪的步行万里);
2006-8-1
{224}
(#3117330@0)
-
肯定是你EXCEL修改后保存时默认编码不对,尝试选择utf8编码保存,或用UltraEDIT编辑,然后保存也要用utf8格式。
-walacato(一天到晚游泳的鱼);
2006-8-1
(#3117488@0)
-
感谢2位... 用了别的方法导入了相应数据, 以后如果需要导入全部数据的话再来汇报。
-zzzboy(GOal-gOal);
2006-8-5
(#3125644@0)