in reply to Perl UTF-8 serving HTML5
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;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Perl UTF-8 serving HTML5
by Anonymous Monk on May 29, 2016 at 19:45 UTC | |
by $h4X4_|=73}{ (Monk) on May 29, 2016 at 21:04 UTC | |
by Anonymous Monk on May 29, 2016 at 21:15 UTC | |
by $h4X4_|=73}{ (Monk) on May 29, 2016 at 21:33 UTC | |
by Anonymous Monk on May 29, 2016 at 23:02 UTC |