From: Michael Andreen Date: Wed, 23 Jul 2008 13:03:13 +0000 (+0200) Subject: Make DBD::Pg mark strings as utf8 X-Git-Url: https://ruin.nu/git/?p=ND.git;a=commitdiff_plain;h=143528bffc63de7c3c3edd5ccdeec04b6871b452 Make DBD::Pg mark strings as utf8 --- diff --git a/DB.pm b/DB.pm index 53db830..102ae7f 100644 --- a/DB.pm +++ b/DB.pm @@ -11,7 +11,7 @@ our @EXPORT = qw/DB/; sub DB { #Use domain sockets by default - my $dbh = DBI->connect_cached("dbi:Pg:dbname=ndawn", "ndawn", "", {AutoCommit => 1, RaiseError => 1}); + my $dbh = DBI->connect_cached("dbi:Pg:dbname=ndawn", "ndawn", "", {AutoCommit => 1, RaiseError => 1, pg_enable_utf8 => 1}); #Easy to also use /etc/postgresql/pg_services.conf #my $dbh = DBI->connect_cached("dbi:Pg:service=ndawn","", "", {AutoCommit => 1}); {