X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Flib%2FRT%2FHandle.pm;h=9f9beb171e16398fcb17dfda5e579abd3b5ab971;hb=HEAD;hp=f0bce38c1d7fe93333614e2040268c63b333a3fa;hpb=de9d037528895f7151a9aead6724ce2df95f9586;p=freeside.git diff --git a/rt/lib/RT/Handle.pm b/rt/lib/RT/Handle.pm index f0bce38c1..9f9beb171 100644 --- a/rt/lib/RT/Handle.pm +++ b/rt/lib/RT/Handle.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2019 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -138,6 +138,11 @@ sub Connect { ($version) = $version =~ /^(\d+\.\d+)/; $self->dbh->{pg_server_prepare} = 0 if $version > 9.1; #and we're using a deb-7 version DBD::Pg? $self->dbh->do("SET bytea_output = 'escape'") if $version >= 9.0; + + # Force UTF8, even when database encoding is not UTF8 + # DBD::Pg used to do this for us prior to v3 + $self->dbh->do('SET client_encoding TO UTF8;'); + $self->dbh->{pg_enable_utf8} = -1; }