From fb3d5b480085fff26e4d7af3e915615144950511 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 12 May 2008 20:40:59 -0400 Subject: 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.) --- debian/changelog | 2 ++ 1 file changed, 2 insertions(+) (limited to 'debian/changelog') diff --git a/debian/changelog b/debian/changelog index 118a0347d..080de759b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,8 @@ ikiwiki (2.46) UNRELEASED; urgency=low wikis that automatically ping one another to stay up to date. * Optimised file statting code when scanning for modified pages; cut the number of system calls in half. (Still room for improvement.) + * Fixes for behavior changes in perl 5.10's CGI that broke utf-8 support + in several interesting ways. -- Joey Hess Mon, 05 May 2008 19:34:51 -0400 -- cgit v1.2.3