in reply to Re^3: CGI hidden params vs. character encoding
in thread CGI hidden params vs. character encoding
Your problem is that you are double-encoding! You're telling CGI to encode your data using UTF8 (-charset => 'utf-8') and then you encode it again using binmode STDOUT, ":utf8";.
But... But... Then why did the double-encoding show up only in that one place?? If the behavior were consistent throughout, I would understand, but I still can't figure out how I got the particular behavior that I did.
The solution is to get rid of binmode completely and only use CGI's methods to output.
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. Also, I don't think I should have to rely entirely on CGI methods for printing content.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: CGI hidden params vs. character encoding
by ikegami (Patriarch) on May 28, 2008 at 01:24 UTC |