How do I quote a UTF-8 String Literal in Sqlite3

前端 未结 4 1252
北海茫月
北海茫月 2020-12-20 20:37

I\'m looking to encode and store Unicode in a Sqlite database. Is there any way to raw encode a UTF-8 (unicode) string literal in a sql query.

I\'m looking for some

4条回答
  •  旧巷少年郎
    2020-12-20 21:31

    What language are you using? SQLite handles Unicode just fine, creating the literals in your hosting language is less obvious.

    $ sqlite3 junk.sqlite
    SQLite version 3.6.22
    sqlite> create table names (id integer primary key, name string);
    sqlite> insert into names values (null, 
        'î℉ yõù g

提交回复
热议问题