Subject: | Misleading sqlite_unicode documentation |
Date: | Thu, 17 May 2012 01:21:13 +0200 |
To: | bug-DBD-SQLite [...] rt.cpan.org |
From: | Bjoern Hoehrmann <derhoermi [...] gmx.net> |
Hi,
Version 1.35 of DBD::SQLite says for `sqlite_unicode` "If set to a
true value, DBD::SQLite will turn the UTF-8 flag on for all text strings
coming out of the database". Given that SQLite 3 defines the term "text
string" as being of the storage class "TEXT", as opposed to "BLOB", this
should probably say something like "all ... including the value of BLOB
columns".
The documentation continues how you might want to request blob behavior
explicitly when when doing UPDATEs, but that fails to address handling
values coming out of the database (and does not seem to make much sense
since the option only affects things "coming out of the database"). That
would seem another issue with the documentation.
(The behavior I am seeing is that DBD::SQLite turns the UTF-8 flag on
when retrieving BLOBs from the database, at least I get UTF-8 warnings
when doing so and trying to serialize the DBI responses using YAML::XS
and Data::Dumper, followed by Perl crashing. I haven't looked at it in
detail, if v1.35 does indeed treat "BLOB" columns different from "TEXT"
columns I'm happy to check what else might be going on.)
regards,
--
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/