ikiwiki/IkiWiki
Joey Hess fb3d5b4800 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 57bba4dac1, 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.)
2008-05-12 20:44:22 -04:00
..
Plugin Fixes for behavior changes in perl 5.10's CGI 2008-05-12 20:44:22 -04:00
Rcs git: Put -- before the filename when calling git rev-list to avoid warning message when the file doesn't exist. 2008-05-02 13:03:42 -04:00
Setup load plugins before printing messages 2008-05-08 16:08:02 -04:00
CGI.pm Fixes for behavior changes in perl 5.10's CGI 2008-05-12 20:44:22 -04:00
Render.pm load plugins before printing messages 2008-05-08 16:08:02 -04:00
Setup.pm
UserInfo.pm Store userinfo in network byte order for easy portability. (Old files will be automatically converted.) 2008-03-19 22:46:51 -04:00
Wrapper.pm