Also the Content-Length $byte_count never comes out correct.
You're taking the length of a string (unicode string, decoded), not of bytes/octets (utf encoded)
Try
binmode STDOUT, ':raw'; $rendered = Encode::encode(utf8 =>$rendered); $byte_count = length $rendered; print <<HTML; Content-Length: $byte_count Content-Type: text/plain; charset=utf-8 HTML exit 0;
In reply to Re: Perl UTF-8 serving HTML5
by Anonymous Monk
in thread Perl UTF-8 serving HTML5
by $h4X4_|=73}{
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |