Re: [Templates] Template::Plugin::MapUTF8 - wrapper around Unicode::MapUTF8.

[prev] [thread] [next] [Date index for 2004/12/21]

From: Tatsuhiko Miyagawa
Subject: Re: [Templates] Template::Plugin::MapUTF8 - wrapper around Unicode::MapUTF8.
Date: 09:49 on 21 Dec 2004
On Tue, 21 Dec 2004 09:14:30 +0000
Tom Insam <tom@xxxxxxxx.xxx> wrote:

> This really shouldn't be required. Feed TT proper perl strings, and in 
> the process() call, set the binmode of the output filehandle to 'utf8', 
> and TT will write the right thing (requires very recent TT release, 
> though)
> 
> $tt->process( $template, $vars, $output_file, { binmode => "utf8" } );

Looking through Template.pm shows that "binmode" option works only when
you dump the template output to files (sub _output). So when you want to
convert the output into some native encodings without dumping to a 
temporary file (i.e. print it to scalar or filehandle), you still have
to do it manually or to setup PerlIO layer before process().


        -- 
        Tatsuhiko Miyagawa <miyagawa@xxxxxxxx.xxx>


_______________________________________________
templates mailing list
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates

Re: [Templates] Template::Plugin::MapUTF8 - wrapper around Unicode::MapUTF8.
Tatsuhiko Miyagawa 09:49 on 21 Dec 2004

Generated at 08:55 on 15 Mar 2005 by mariachi v0.52