Hi,
I'm trying to populate TT2 utf8 template with variables which also
contain utf8 characters. After processing with TT2, the static text in
the template looks double encoded to Unicode (utf8::encode) but the
dynamic text (the one that comes from vars) is OK.
I use perl 5.8.6, TT 2.14, my perl script is:
==================================
#!/usr/bin/perl
use strict;
use utf8;
use Template;
my $template = Template->new({ INCLUDE_PATH => '.' });
$template->process('test.tt', { test => "test" }, '/tmp/x', binmode => ':utf8' )
|| die $template->error();
==================================
If I don't specify binmode the problem occurs only when I use wide
characters for the value of the var test (if run with latin value
'test', the output of /tmp/x is fine).
Thanks in advance!
P.S. Any share of experience with utf8 templates and utf8 vars would
be appreciated
_______________________________________________
templates mailing list
[email protected]
http://lists.template-toolkit.org/mailman/listinfo/templates