vc+odbc 往mysql(utf-8)数据库写入繁体字
数据库是utf-8编码
在ODBC里设置 SET NAMES GBK ,当遇到有些繁体字时就无法写入提示是
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ....
设置 SET NAMES utf8 当然也不行,直接提示
Incorrect string value: "\x96|\xB1\xB1\xEB\x8A..." for column "CN_SEC_ABNM_TC" at row 1
难道要在程序里把字符都编码成utf-8才能写吗?现在不想改程序,有什么简单的方法解决?