[Israel.pm] Testing Template::Toolkit utf8 handling

Shlomi Fish shlomif at iglu.org.il
Sat Apr 12 23:39:28 PDT 2008


On Saturday 12 April 2008, Shmuel Fomberg wrote:
> Shmuel Fomberg wrote:
> > I want to test TT utf8 handling. for doing so, I need to prepare a
> > string 'x[% somevar y%]', where 'x[' should together be a utf8 char, and
> > 'y%' should be other char.
> > If TT handles utf8 incorrectly, it should be an error. If TT handle it
> > correctly, it should just print it literally.
>
> Still want to test, but I found how to tell TT how to handle data as
> utf8. Can be done writing:
> my $template = Template->new({ ENCODING => 'UTF-8' });
>
> and for the CAP::AnyTemplate to make TT do it I wrote:
> $self->template->config(default_type => 'TemplateToolkit',
>                          TemplateToolkit => { ENCODING => 'UTF-8' });
>
> Of course, nothing of it is documented. uff.
>

In that case, the right thing to do is to:

1. Write a patch to the POD.

2. Submit it to the module's bug-tracker.

3. Possibly blog about it in a prominent place and/or write a short howto on 
your homepage.

Regards,

	Shlomi Fish

---------------------------------------------------------------------
Shlomi Fish      shlomif at iglu.org.il
Homepage:        http://www.shlomifish.org/

I'm not an actor - I just play one on T.V.



More information about the Perl mailing list