diff options
author | Matthew Somerville <matthew@fury.ukcod.org.uk> | 2011-02-25 12:52:41 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@fury.ukcod.org.uk> | 2011-02-25 12:52:41 +0000 |
commit | d0bcc4d1d639b7ae806e8719727d3494a6229db1 (patch) | |
tree | 9f5e787a2a7b88356261d4b8896c264b538b9fab | |
parent | 2748bd43e702b439db96f769dcace0b4e9b34fc2 (diff) |
Load in file manually, to decode_utf8 it.
-rw-r--r-- | perllib/Page.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/perllib/Page.pm b/perllib/Page.pm index 2ce44f410..774adc838 100644 --- a/perllib/Page.pm +++ b/perllib/Page.pm @@ -254,7 +254,9 @@ sub template_include { return undef unless -e $template_file; $template = Text::Template->new( - SOURCE => $template_file, + TYPE => 'STRING', + # Don't use FILE, because we need to make sure it's Unicode characters + SOURCE => decode_utf8(File::Slurp::read_file($template_file)), DELIMITERS => ['{{', '}}'], ); return $template->fill_in(HASH => \%params); |