http://www.perlmonks.org?node_id=1090190


in reply to Re^2: Need tipps for identifying utf-8 problems with Dancer and MySQL
in thread Need tipps for identifying utf-8 problems with Dancer and MySQL

Hi,

First of all I don't know sqlite3. There are some players in the game: sqlite3 and DBD::xxx. When the DBD driver for sqlite you use does not decode the byte strings which come from the sqlite database, than you have to do it.

use Encode qw(decode); my $decoded_string = decode('UTF-8', $byte_string_from_sqlite);

Which driver 'DBD::xxx' are you using?

UPDATE: Have a look at http://search.cpan.org/~ishigaki/DBD-SQLite/lib/DBD/SQLite.pm#DRIVER_PRIVATE_ATTRIBUTES. I'm pretty sure that is what you are looking for: sqlite_unicode

Regards
McA

  • Comment on Re^3: Need tipps for identifying utf-8 problems with Dancer and MySQL
  • Download Code

Replies are listed 'Best First'.
Re^4: Need tipps for identifying utf-8 problems with Dancer and MySQL
by kwetal (Initiate) on Jun 18, 2014 at 13:45 UTC
    $dbh->{sqlite_unicode} = 1;

    Well yes! That's exactly the answer to my problem. Thank you very much.

    That explains why I couldn't find it in perldoc DBD; clearly I was browsing the wrong doc.