Hi All,
I just changed Bricolage so that all string variables are now upgraded to use Perl's internal UTF-8 representation. This is great, but it means that they don't mix will with non-utf8 variables. Since the templating architectures (including TT) are not explicitly using utf8 variables, there could be some clashes. The best away around this, I've found, is to add C<use utf8;> to the top of every template. I was able to figure out how to do this with Mason by using its "preamble" parameter to add it to every template:
my $interp = HTML::Mason::Interp->new(
....
preamble => "use utf8;\n",
);So my question is, does TT have a similar facility to allow me to add some arbitrary code to the top of every template it compiles? Kang-min Liu pointed me to this post from Ilya Marinov:
http://www.template-toolkit.org/pipermail/templates/2003-November/ 005342.html
But that seems like overkill to me, since C<use utf8;> seems to do this for you.
Thanks!
David
smime.p7s
Description: S/MIME cryptographic signature
