On Wednesday 07 July 2010 07:37:28 Alex Kapranoff wrote:
Proper fix would be to apply this patch to your Dancer: diff --git a/lib/Dancer/Template/TemplateToolkit.pm b/lib/Dancer/Template/Templa index 0e092db..4bdb717 100644 --- a/lib/Dancer/Template/TemplateToolkit.pm +++ b/lib/Dancer/Template/TemplateToolkit.pm @@ -19,6 +19,7 @@ sub init { my $tt_config = { ANYCASE => 1, ABSOLUTE => 1, + ENCODING => 'utf8', %{$self->config}, };
Rather than patching Dancer::Template::TemplateToolkit I believe you could also pass it in the config, e.g.: engines: template_toolkit: ENCODING: utf8 It may be safe in fact to make this the default, but we'd have to carefully consider whether that's likely to lead to breakage in any odd cases...