首先安装好ODBC MYSQL驱动
(64位)
(32位)
然后,打开vqb
查询
插入
MATLAB通过ODBC操作MYSQL的中文乱码,需要在数据源中进行配置
查询数据(中文乱码消失了)
插入中文数据
>> y2={'追求'}
y2 =
'追求'
>>
测试一下,查看中文数据是否正确插入
此外,关于字符编码转换的2个函数
native2unicode
Convert numeric bytes to Unicode characters
Syntax
unicodestr = native2unicode(bytes)
unicodestr = native2unicode(bytes, encoding)
Description
unicodestr = native2unicode(bytes) takes a vector containing numeric values in the range [0,255] and converts these values as a stream of 8-bit bytes to Unicode characters. The stream of