Skip Menu |

This queue is for tickets about the DBD-SQLite CPAN distribution.

Report information
The Basics
Id: 96877
Status: resolved
Priority: 0/
Queue: DBD-SQLite

People
Owner: Nobody in particular
Requestors: DAMI [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



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')");
Le Mer 02 Jui 2014 03:03:29, DAMI a écrit : Show quoted text
> 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).
Fixed in https://github.com/DBD-SQLite/DBD-SQLite/tree/rt_96877_unicode_statements. But this is a change of behavior that might break old applications ... so the question is to merge or not to merge
On Sun Jul 06 15:35:09 2014, DAMI wrote: Show quoted text
> Le Mer 02 Jui 2014 03:03:29, DAMI a écrit :
> > 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).
> > Fixed in https://github.com/DBD-SQLite/DBD- > SQLite/tree/rt_96877_unicode_statements. > > But this is a change of behavior that might break old applications ... > so the question is to merge or not to merge
Thanks. DBD::SQLite 1.43_04 with a fix is released.
Closed as 1.44 was released. Thanks.