diff options
| author | Mitch Jackson <mitch@freeside.biz> | 2019-03-03 19:26:41 -0500 |
|---|---|---|
| committer | Mitch Jackson <mitch@freeside.biz> | 2019-03-03 19:53:42 -0500 |
| commit | 863879eae9bc840432b09750eae6e552e9bbe205 (patch) | |
| tree | 532f0f9444b464e807e5e2631a4041be824ebe50 /rt/lib/RT/Handle.pm | |
| parent | 50a717fa7328dfb36d8d3d6c30d616399cda771f (diff) | |
RT# 82942 Force UTF8 client_encoding for Pg in RT::Handle
Diffstat (limited to 'rt/lib/RT/Handle.pm')
| -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 f0bce38c1..35d218c1d 100644 --- a/rt/lib/RT/Handle.pm +++ b/rt/lib/RT/Handle.pm @@ -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; } |
