-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 09/22/2011 04:53 PM, David Garfield wrote: > As far as I am concerned, this is a SERIOUS bug in sqlite.
It gets worse. Many of those string functions will also happily operate on blobs where it makes no sense. (A bunch of bytes without an encoding cannot be treated as text.) You can also create UTF16 strings with an odd number of bytes. sqlite> select cast(x'6a6b6c' as text); jkl sqlite> pragma encoding=utf16; sqlite> select cast(x'6a6b6c' as text); 歪 sqlite> select length(cast(x'6a6b6c' as text)); 1 sqlite> select hex(cast(x'6a6b6c' as text)); 6A6B6C sqlite> select hex('jkl'); 6A006B006C00 Roger -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk570G4ACgkQmOOfHg372QSBnACfQ5zkX2sRU7L88LeuQ4R6dKyM 2D4An2zeXE6YYpBIceSnpB7Yr5HbSI92 =eQST -----END PGP SIGNATURE----- _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users