# control both ends, so just always gzip the response.
require Compress::Zlib;
- my $html = html( "Hello", "Hi there! ☺" );
+ my $html = Encode::encode('UTF-8', html( "Hello", "Hi there! ☺" ));
$c->response->content_type("text/html; charset=utf-8");
$c->response->output( Compress::Zlib::memGzip($html) );
$c->response->content_encoding('gzip');