Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在 SQLite 表中插入商标等特殊符号?我尝试使用 PRAGMA encoding = "UTF-16" 没有效果:(
通常,如果您使用 '' 单引号将 SQL 条目括起来,它会以文字形式出现。
IE
'™'
问题解决了。需要用 sqlite3_open16 打开 DB 文件,然后执行命令 PRAGMA encoding = \"UTF-16\"; (我不确定,如果有必要)。现在插入将使用 UTF-16 完成。要从 db 中选择(获取列值)需要使用 sqlite3_column_text16 函数