1 package TestAppEncoding::Controller::Root;
4 use base 'Catalyst::Controller';
7 __PACKAGE__->config->{namespace} = '';
11 $c->res->content_type('image/gif');
13 open(my $fh, '<', $c->path_to('..', '..', 'catalyst_130pix.gif')) or die $!;
15 local $/ = undef; <$fh>;
19 sub binary_utf8 : Local {
21 $c->forward('binary');
22 my $str = $c->res->body;
24 ok utf8::is_utf8($str), 'Body is variable width encoded string';
28 # called by t/aggregate/catalyst_test_utf8.t
29 sub utf8_non_ascii_content : Local {
33 my $str = 'ʇsʎlɐʇɐɔ'; # 'catalyst' flipped at http://www.revfad.com/flip.html
34 ok utf8::is_utf8($str), '$str is in UTF8 internally';
36 $c->res->content_type('text/plain');