From bc55b2cf6cd271c0d3509e3bca32f724d814c615 Mon Sep 17 00:00:00 2001 From: Chris Nighswonger Date: Wed, 14 Nov 2007 16:10:06 -0600 Subject: [PATCH] Added code to notify PostgreSQL server of utf8 client when opening connection Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- C4/Context.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/C4/Context.pm b/C4/Context.pm index 4be0395265..467944cc47 100644 --- a/C4/Context.pm +++ b/C4/Context.pm @@ -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; } -- 2.39.5