SQLite数据库使用like模糊查询中文问题
1.首先查看sqlite编码
PRAGMA encoding;
2.编写UTF-8与BG2312转换函数
//UTF-8到GB2312的转换
char* U2G(const char* utf8)
{
int len = MultiByteToWideChar(CP_UTF8, 0, utf8, -1, NULL, 0);
wchar_t* wstr = new wchar_t[len+1];
memset(wstr, 0, len+1);
MultiByteToWideChar(CP_UTF...
原创
2020-09-07 16:51:25 ·
1827 阅读 ·
0 评论