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

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

From: Tom Insam
Subject: Re: [Templates] Template::Plugin::MapUTF8 - wrapper around Unicode::MapUTF8.
Date: 09:14 on 21 Dec 2004
On Dec 20, 2004, at 19:49, Igor Lobanov wrote:

> Today I met problem with reading our site newsfeed which uses xml with
> native encoding. I decided to generate newsfeeds in UTF8 charset. The
> only thing I needed was to add convertion filter "my_charset" ->
> "utf8". In my scripts I use Unicode::MapUTF8 for such purpose which
> have 2 function for conversions. So I wrote Template::Plugin::MapUTF8
> which defines 2 filters "from_utf8" and "to_utf8".

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" } );


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

Re: [Templates] Template::Plugin::MapUTF8 - wrapper around Unicode::MapUTF8.
Tom Insam 09:14 on 21 Dec 2004

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