Matlab写MySQL时中文乱码,how to fix it

1 view (last 30 days)
Donghui  Sun
Donghui Sun on 26 Mar 2014
我需要从MySQL的一张表中读出数据,然后再写入另外一张表中。
cursor = fetch(conn, sqlquery);
这句代码可以正常读到表中的数据,其中的中文也是正常的。 然后我用下面的代码为读到的数据加一些内容,写到另外一张表中。
cursor{end+1} = i;
fastinsert(conn, 'af_retrieval', colnames, cursor);
数据可以写入,但是所有的中文都变成了问号'?'. 另外我在手工在phpmyadmin中添加一条记录中文也是可以显示的。但是不不知道为什么用fastinsert写入的时候,会出现乱码?

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!