summaryrefslogtreecommitdiff
path: root/rt/lib/RT/Interface/Web/Handler.pm
diff options
context:
space:
mode:
Diffstat (limited to 'rt/lib/RT/Interface/Web/Handler.pm')
-rw-r--r--rt/lib/RT/Interface/Web/Handler.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/rt/lib/RT/Interface/Web/Handler.pm b/rt/lib/RT/Interface/Web/Handler.pm
index 07e770724..7cf18d1ab 100644
--- a/rt/lib/RT/Interface/Web/Handler.pm
+++ b/rt/lib/RT/Interface/Web/Handler.pm
@@ -251,7 +251,6 @@ use CGI::Emulate::PSGI;
use Plack::Request;
use Plack::Response;
use Plack::Util;
-use Encode qw(encode_utf8);
sub PSGIApp {
my $self = shift;
@@ -328,7 +327,10 @@ sub _psgi_response_cb {
$cleanup->();
return '';
}
- return utf8::is_utf8($_[0]) ? encode_utf8($_[0]) : $_[0];
+ # XXX: Ideally, responses should flag if they need
+ # to be encoded, rather than relying on the UTF-8
+ # flag
+ return Encode::encode("UTF-8",$_[0]) if utf8::is_utf8($_[0]);
return $_[0];
};
});