On 13 May 2012, at 4:49pm, Roger Binns <rog...@rogerbinns.com> wrote:

> You should be accessing things via SQL and the C API.  In that case the
> encoding in the database is not relevant as the strings have their
> encoding converted as appropriate.
> 
> sqlite3_column_bytes and sqlite3_column_bytes16 tell you the length of the
> utf8/16 string in bytes while sqlite3_column_text and
> sqlite3_column_text16 get you the utf8/16 data.
> 
>  http://www.sqlite.org/c3ref/column_blob.html

Rather than this shillying and shallying, I'll just tell you that if you want 
to know how many Unicode characters there are in a SQLite string, you'll have 
to use a unicode library that isn't part of SQLite.  SQLite just stores Unicode 
strings.  It doesn't understand them.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to