X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=rt%2Flib%2FRT%2FHandle.pm;h=4da645249d0e7bde4cb82a5560c33c44adb25b9c;hb=187086c479a09629b7d180eec513fb7657f4e291;hp=a990e9d8999f641fe295cd0b9c588f4d2c59e1a6;hpb=7322f2afedcc2f427e997d1535a503613a83f088;p=freeside.git diff --git a/rt/lib/RT/Handle.pm b/rt/lib/RT/Handle.pm index a990e9d89..4da645249 100644 --- a/rt/lib/RT/Handle.pm +++ b/rt/lib/RT/Handle.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2018 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; }