in reply to Re^2: Confusing UTF-8 bug in CGI-script
in thread Confusing UTF-8 bug in CGI-script
# Wrong, and the cause of the OP's problem. See my reply to the OP. binmode(STDIN, ':encoding(UTF-8)');
That's what I would've thought, too, but interestingly, it doesn't do any harm in practice (I did try it), and
# Necessary to encode the returned HTML. binmode(STDOUT, ':encoding(UTF-8)');
only seems to be required with newer versions of CGI.pm (as I mentioned). Older versions apparently did the encoding themselves before printing to STDOUT (?)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Confusing UTF-8 bug in CGI-script
by ikegami (Patriarch) on Feb 01, 2011 at 19:20 UTC | |
by Anonyrnous Monk (Hermit) on Feb 01, 2011 at 19:25 UTC | |
by ikegami (Patriarch) on Feb 01, 2011 at 20:15 UTC | |
by Anonyrnous Monk (Hermit) on Feb 01, 2011 at 21:59 UTC | |
by ikegami (Patriarch) on Feb 02, 2011 at 01:51 UTC |