I set the schema to TEXT, but that apparently makes no difference! I'm using the TCL interface:
set id "???" db eval {insert into users (id, name) values (:id, :name)} The documentation says the : ensures that the insert is done in such a way as to help against SQL injection, but there is nothing about how to force it to insert as text instead of a blob. (https://www.sqlite.org/tclsqlite.html#eval) Is there a way to enforce this? -----Original Message----- From: sqlite-users-bounces at mailinglists.sqlite.org [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Stephan Beal Sent: 17 February 2016 14:09 To: SQLite mailing list Subject: Re: [sqlite] Possible error using length on UTF-8 characters On Wed, Feb 17, 2016 at 2:59 PM, Glyn Jones <glynj at bsquare.com> wrote: > Agreed. > The problem is that "length(id)" returns double the number of UTF-8 > characters, rather than the actual number input to the field using "insert". > According to the docs, i does that only if you've stored the data as a BLOB, not TEXT. You need to confirm that you haven't stored the field as a blob. -- ----- stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal "Freedom is sloppy. But since tyranny's the only guaranteed byproduct of those who insist on a perfect world, freedom will have to do." -- Bigby Wolf _______________________________________________ sqlite-users mailing list sqlite-users at mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users