On 02/24/2011 03:31 PM, André Warnier wrote: > Hi. > > I wonder if someone here can give me a clue as to where to look...
If you have a fairly recent CGI.pm, it will decode utf-8 properly for you (even avoiding double-decoding), but there are some caveats. In addition to what others have already said, If you are running under mod_perl (which obviously you are), CGI.pm adds a cleanup handler (via register_cleanup) which resets CGI.pm's global variables. One of the variables that gets reset is the PARAM_UTF8 variable (which the -utf8 import controls). Because of this, once the clenaup handler gets called, UTF-8 decoding gets turned off. You have to work around this by manually making sure $CGI::PARAM_UTF8 = 1 before calling CGI->new. Regards, Michael Schout