How can I insert special symbols like trademark into SQLite table? I have tried to use PRAGMA encoding = "UTF-16" with no effect :(
Asked
Active
Viewed 2,694 times
2
-
1Please post the query/code you are using for insertion. – Björn Pollex Sep 23 '10 at 13:04
2 Answers
2
Typically if you surround an SQL entry with ''Single quotes, it goes in as a literal.
i.e.
'™'

Michael Eakins
- 4,149
- 3
- 35
- 54
-
1problem 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. – Martin Pilch Sep 23 '10 at 17:43
1
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

Martin Pilch
- 3,245
- 3
- 38
- 61