[Templates] Encoding patch for Provider
Tom Insam
tom@jerakeen.org
Wed, 01 Feb 2006 09:57:07 +0000
Bill Moseley wrote:
> >
> > An unanswered question is should TT also encode output, or should
> > setting the output io layer be left to the user?
TT already has a 4th option to the 'process' method, an options hash.
This takes a 'binmode' key, that can define the output IO layer. eg
$tt->process( $templatefile, $vars, $output, { binmode => ':utf8' } );
will encode the output to utf-8 before writing. Andy - as regards your
reply, I think it would be a bad idea to assume the same input and
output template character sets. But that's just me.
tom