In order to use Perl's internal Unicode encoding with the Template
Toolkit, Template, and UTF-8 encoded files, it is necessary
both to specify the encoding when creating the template object, and to
specify a fourth argument to the object's process
command, consisting of a hash reference {binmode =>
':utf8'}:
use Template; # Give the object an argument ENCODING my $tt = Template->new ({ENCODING => 'utf8'}); # Add a fourth argument to "process": $tt->process ("input_file_name", $variables, $output_scalar, {binmode => ":utf8"}) or die $tt->error ();