But... But... Then why did the double-encoding show up only in that one place??
Because the rest were ASCII characters.
use Encode qw( encode ); $str = '<p>foo</p>'; for (1..5) { print("$str\n"); $str = encode('UTF-8', $str); }
<p>foo</p> <p>foo</p> <p>foo</p> <p>foo</p> <p>foo</p>
I'm not sure about that. If I comment out the "binmode STDOUT..." in the OP code (having fixed all other encoding specs to "UTF-8" as described), I get "Wide character in print" warnings showing up in the error log
ARGH! CGI doesn't seem to be encoding. What's -charset for, then!? I need to look into this more.
By the way, <p/> makes no sense. <p/>text<p/>text means <p></p>text<p></p>text but you want <p>text</p><p>text</p> is what you want.
In reply to Re^5: CGI hidden params vs. character encoding
by ikegami
in thread CGI hidden params vs. character encoding
by graff
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |