Subject: | sql statements should be converted to utf8 |
According to the sqlite doc, the SQL argument to sqlite3_prepare_v2 should be in utf8, but DBD::SQLite does not ensure this (even with sqlite_unicode => 1). Only bind values are properly converted.
As a result, the following inserts are not equal :
my $string = "caractères accentués";
# correct insert, string will be converted to utf8
$dbh->do("INSERT INTO foo(bar) VALUES(?)", {}, $string);
# incorrect insert
$dbh->do("INSERT INTO foo(bar) VALUES('$string')");