diff options
author | Mitch Jackson <mitch@freeside.biz> | 2019-03-03 19:26:41 -0500 |
---|---|---|
committer | Mitch Jackson <mitch@freeside.biz> | 2019-03-03 20:35:09 -0500 |
commit | a6483866254ab76880c010a2534268a4c24c94be (patch) | |
tree | 6bf32a48d631453499d07b90b6ebc7561d408199 /rt | |
parent | fcce61390d750f98bd82e84d4664ae9c03202be2 (diff) |
RT# 82942 Force UTF8 client_encoding for Pg in RT::Handle
Diffstat (limited to 'rt')
-rw-r--r-- | rt/lib/RT/Handle.pm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/rt/lib/RT/Handle.pm b/rt/lib/RT/Handle.pm index 794d8b009..3b411d5e4 100644 --- a/rt/lib/RT/Handle.pm +++ b/rt/lib/RT/Handle.pm @@ -130,6 +130,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; } |