У меня есть следующий код:
Код: Выделить всё
use utf8;
use CGI('-utf8'); #added based on another forum article i was reading.
use Encode;
.....
my $localcontent = JSON->new->utf8->encode($data);
#i write $localcontent back in mysql and can see that it is good.
print $cgi->header(
-type => 'application/json',
-cookie => $_sessioncookie,
-content_length => length($localcontent),
-charset => 'UTF-8'
);
Encode::encode( 'UTF-8', $localcontent );
#i also tried binmode for STDOUT (binmode(STDOUT, ':encoding(UTF-8)');) but that gives the same result.
Есть ли какие-нибудь советы, как мне продолжить отладку, или есть советы, как правильно это настроить?
п>
Подробнее здесь: https://stackoverflow.com/questions/793 ... f8-content
Мобильная версия