aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-05-12 20:40:59 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-05-12 20:44:22 -0400
commitfb3d5b480085fff26e4d7af3e915615144950511 (patch)
treecaefa3b0b3cedb42d517f6b697b0f16372e8c2cf /doc
parent80a110ad60f172395916276507bde29d482e0819 (diff)
downloadikiwiki-fb3d5b480085fff26e4d7af3e915615144950511.tar
ikiwiki-fb3d5b480085fff26e4d7af3e915615144950511.tar.gz
Fixes for behavior changes in perl 5.10's CGI
Something has changed in CGI.pm in perl 5.10. It used to not care if STDIN was opened using :utf8, but now it'll mis-encode utf-8 values when used that way by ikiwiki. Now I have to binmode(STDIN) before instantiating the CGI object. In 57bba4dac132a06729eeec809f5e1a5adf829806, I changed from decoding CGI::Formbuilder fields to utf-8, to decoding cgi parameters before setting up the form object. As of perl 5.10, that approach no longer has any effect (reason unknown). To get correctly encoded values in FormBuilder forms, they must once again be decoded after the form is set up. As noted in 57bba4da, this can cause one set of problems for formbuilder_setup hooks if decode_form_utf8 is called before the hooks, and a different set if it's called after. To avoid both sets of problems, call it both before and after. (Only remaining problem is the sheer ugliness and inefficiency of that..) I think that these changes will also work with older perl versions, but I haven't checked. Also, in the case of the poll plugin, the cgi parameter needs to be explcitly decoded before it is used to handle utf-8 values. (This may have always been broken, not sure if it's related to perl 5.10 or not.)
Diffstat (limited to 'doc')
-rw-r--r--doc/bugs/poll_plugin:_can__39__t_vote_for_non-ascii_options.mdwn6
1 files changed, 2 insertions, 4 deletions
diff --git a/doc/bugs/poll_plugin:_can__39__t_vote_for_non-ascii_options.mdwn b/doc/bugs/poll_plugin:_can__39__t_vote_for_non-ascii_options.mdwn
index e09e6c29d..0f045c254 100644
--- a/doc/bugs/poll_plugin:_can__39__t_vote_for_non-ascii_options.mdwn
+++ b/doc/bugs/poll_plugin:_can__39__t_vote_for_non-ascii_options.mdwn
@@ -3,7 +3,5 @@ I don't seem to be able to vote for options that have non-ascii names, using the
As an example, see http://test.liw.fi/testpoll/index.html: the "red", "green", and "blue" options work fine, but the "ehkä" one does not.
--[liw](http://liw.fi/)
-> It's not just the poll plugin, editing a page with utf-8 will corrupt it
-> now! I wonder if this is a perl 5.10 change; it was working just fine as
-> recently as May 8th; I upgraded perl on the 9th and it's broken for me
-> now. --[[Joey]]
+> Ok, 4.5 hours of beating my head against a brick wall, and I've fixed this.
+> [[done]] --[[Joey]]