Subject: | problen with сyrillic encoding |
I have problem with cyrillic encoding in browser when runnig this code,
use utf8;
my $data_out1;
my $data_out2;
my $ redis = MojoX::Redis->new(server => '127.0.0.1:6379', encoding =>
'UTF-8');
$redis = $redis->ioloop(Mojo::IOLoop->new);
$redis->hmset('111', 'test1', 'test1_нормально', 'test2, 'test2_нормально');
$redis->hmget('111', 'test1', 'test2' => sub {
my ($redis, $res) = @_;
$data_out1 = $res->[0];
$data_out2 = $res->[1];
$redis->stop;
});
$redis->start;
$self->stash(redis_text => $data_out1->[0].$data_out2->[0] );
$redis->quit;
In browser latin encoding is normal, cyrillic encoding is wrong (крякозябры).
#uname -a
Linux 2.6.33 i686 zenwalk.org
#perl -v
5.10.1
#mojolicious version
1.64 (running as daemon)
#mojox::redis version
0.8
#redis version
2.2.12
#browsers version
opera 10.60
isecat 3.6.3