SQLite-在表中插入特殊符号(商标,...) [英] SQLite - Insert special symbols (trademark, ...) into table

查看:127
本文介绍了SQLite-在表中插入特殊符号(商标,...)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在SQLite表中插入诸如商标之类的特殊符号?我尝试使用PRAGMA encoding ="UTF-16"无效:(

How can I insert special symbols like trademark into SQLite table? I have tried to use PRAGMA encoding = "UTF-16" with no effect :(

推荐答案

问题已解决.必须使用sqlite3_open16打开数据库文件,然后执行命令PRAGMA encoding = \"UTF-16 \"; (我不确定,是否有必要).现在,插入将使用UTF-16完成. 要从db中进行选择(获取列值),必须使用sqlite3_column_text16函数

problem solved. it is necessary to open DB file with sqlite3_open16, then execute command PRAGMA encoding = \"UTF-16\"; (I am not sure, if it is necessary). Now the insert will be done with UTF-16. To select from db (to get column value) is necessary to use sqlite3_column_text16 function

这篇关于SQLite-在表中插入特殊符号(商标,...)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆