]> git.sesse.net Git - pr0n/commitdiff
Fix UTF-8 issues in reading templates.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 20 Nov 2015 14:30:54 +0000 (15:30 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 20 Nov 2015 14:30:54 +0000 (15:30 +0100)
perl/Sesse/pr0n/Templates.pm

index 61685c4af6816bfcdaad5fe8318fac93465bab54..ecac13f623d3c6e29e5bd59fc3a8e086c129de61 100644 (file)
@@ -56,7 +56,7 @@ sub fetch_template {
        my $newcache = {};
 
        my $base = $Sesse::pr0n::Config::template_base;
-       open TEMPLATE, "<$base/$dir/$template"
+       open TEMPLATE, "<:utf8", "$base/$dir/$template"
                or ($dir ne 'default' and open TEMPLATE, "<$base/default/$template")
                or Sesse::pr0n::Common::error($r, "Couldn't open $dir/$template: $!");