5 # For reported: https://rt.cpan.org/Ticket/Display.html?id=103063
8 package MyApp::Controller::Root;
9 $INC{'MyApp/Controller/Root.pm'} = __FILE__;
11 use base 'Catalyst::Controller';
13 sub example :Local Args(0) {
14 pop->stash->{testing1} = 'testing2';
20 #MyApp->config(decode_query_using_global_encoding=>1, encoding => 'SHIFT_JIS');
21 #MyApp->config(do_not_decode_query=>1);
22 #MyApp->config(decode_query_using_global_encoding=>1, encoding => undef);
23 MyApp->config(default_query_encoding=>'SHIFT_JIS');
29 use Catalyst::Test 'MyApp';
31 use HTTP::Request::Common;
34 my $shiftjs = 'test ใในใ';
35 my $encoded = Encode::encode('SHIFT_JIS', $shiftjs);
37 ok my $req = GET "/root/example?a=$encoded";
38 my ($res, $c) = ctx_request $req;
40 is $c->req->query_parameters->{'a'}, $shiftjs, 'got expected value';