Re: [sqlite] Is it possible to determine the length of UNICODE(UTF-8 or UTF-16) strings stored in SQLite 3.7.11 database?

2012-05-13 Thread Simon Slavin
On 13 May 2012, at 6:26pm, Richard Hipp wrote: > sqlite> select length('Gödel'), length(CAST('Gödel' AS blob)); > 5|6 > > SQLite does not know how to convert unicode to upper or lower case because > case conversion is locale dependent. But the number of characters in a >

Re: [sqlite] Is it possible to determine the length of UNICODE(UTF-8 or UTF-16) strings stored in SQLite 3.7.11 database?

2012-05-13 Thread Richard Hipp
On Sun, May 13, 2012 at 1:18 PM, Simon Slavin wrote: > > On 13 May 2012, at 4:49pm, Roger Binns 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

Re: [sqlite] Is it possible to determine the length of UNICODE(UTF-8 or UTF-16) strings stored in SQLite 3.7.11 database?

2012-05-13 Thread Simon Slavin
On 13 May 2012, at 4:49pm, Roger Binns 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

Re: [sqlite] Is it possible to determine the length of UNICODE(UTF-8 or UTF-16) strings stored in SQLite 3.7.11 database?

2012-05-13 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 13/05/12 08:07, Frank Chang wrote: > Good Morning, Is it possible to determine the length of UNICODE(UTF-8 > or UTF-16) strings stored in SQLite 3.7.11 database? http://www.sqlite.org/fileformat.html You should be accessing things via SQL and the

Re: [sqlite] Is it possible to determine the length of UNICODE(UTF-8 or UTF-16) strings stored in SQLite 3.7.11 database?

2012-05-13 Thread Keith Medcalf
> Good Morning, Is it possible to determine the length of UNICODE(UTF-8 or UTF- > 16) strings stored in SQLite 3.7.11 database? >I just tried using the IBM open-source ICU function int32_t u_strlen(const > UCHAR* str) but it gives me erroneous? Evidently the u_strlen function for a > UTF-8

[sqlite] Is it possible to determine the length of UNICODE(UTF-8 or UTF-16) strings stored in SQLite 3.7.11 database?

2012-05-13 Thread Frank Chang
Good Morning, Is it possible to determine the length of UNICODE(UTF-8 or UTF-16) strings stored in SQLite 3.7.11 database? I just tried using the IBM open-source ICU function int32_t u_strlen(const UCHAR* str) but it gives me erroneous? Evidently the u_strlen function for a UTF-8 NULL