in reply to Re: Perl UTF-8 serving HTML5
in thread Perl UTF-8 serving HTML5
The binmode STDOUT, ':raw' is because you have already encoded your data. If you put STDOUT in UTF-8 mode, it will end up double-encoded.
If you are on a Windows system, the byte count discrepancy might be because Perl represents line breaks internally as line feed characters. When it does output it converts the line breaks to native format. If run on Windows, this adds one character per line. Putting the handle into ':raw' mode prevents this.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Perl UTF-8 serving HTML5
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 |