[Dancer-users] Problem with PLACK

David Precious davidp at preshweb.co.uk
Wed Jul 7 16:40:33 CEST 2010


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...



More information about the Dancer-users mailing list