Added code to notify PostgreSQL server of utf8 client when opening connection

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
Chris Nighswonger 2007-11-14 16:10:06 -06:00 committed by Joshua Ferraro
parent 8b50bde81b
commit bc55b2cf6c
1 changed files with 3 additions and 0 deletions

View File

@ -596,6 +596,9 @@ sub _new_dbh
$dbh->do("set NAMES 'utf8'") if ($dbh);
$dbh->{'mysql_enable_utf8'}=1; #enable
}
elsif ( $db_driver eq 'Pg' ) {
$dbh->do( "set client_encoding = 'UTF8';" );
}
return $dbh;
}