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

Andrew McGregor andy at txm.net
Fri Dec 4 10:25:23 GMT 2009


I'm hoping someone can help me with a UTF-8 problem.

If a user enters latin-1 into a (CGI::Fast) form and submits, and the
string is displayed (HTML::Template) as expected.

If a user enters UTF-8 chars then the string displayed is corrupt, or
looks like it has been double encoded.

If I remove CGI::Fast then there is no problem.

If I die $string before hitting HTML::Template then the UTF-8 string
is displayed properly.

I've patched HTML::Template to allow UTF-8 files.  I've tried passing
in a fh opened as UTF-8 (segfault).

I read somewhere that Perl doesn't cope well concatenating latin-1 and
UTF-8 strings - could this be happening in HTML::Template?

Or should I be posting somewhere else, HTML::Template list or CGI::Fast list?

This is perl, v5.8.8 built for i386-linux-thread-multi



More information about the london.pm mailing list