UTF-8 + HTML::Template + CGI::Fast

Dave Hodgkinson davehodg at gmail.com
Fri Dec 4 11:18:31 GMT 2009

On 4 Dec 2009, at 10:54, Andrew McGregor wrote:

>> If a user enters UTF-8 chars then the string displayed is corrupt, or
>> looks like it has been double encoded.
> Adding this:
> 1293 $rtbx_senderDetails = decode("utf8", $rtbx_senderDetails);
> Just before passing the param to HTML::Template seems to work.
> So I'm switching the UTF flag on which means it is handled correctly
> by HTML::Template?
> Also, is there a more global way to resolve this as there are a few fields?

Every string needs to be laundered AFAIK.

Maybe 5.12 will make it all better?

Dave Hodgkinson                                MSN: davehodg at hotmail.com
Site: http://www.davehodgkinson.com                  UK: +44 7768 490620
Blog: http://www.davehodgkinson.com/blog
Photos: http://www.flickr.com/photos/davehodg

More information about the london.pm mailing list