use strict;
use IkiWiki;
use IkiWiki::UserInfo;
+use encoding 'utf8'; # force use of utf8 for io layer
package IkiWiki;
unlockwiki();
+ # Force reading the template as utf-8, necessary if
+ # rcs_recentchanges returns true utf-8 strings.
+ open(TMPL, "<:utf8", "$config{templatedir}/recentchanges.tmpl");
+ my $template=HTML::Template->new(filehandle => *TMPL);
+ close(TMPL);
my $template=HTML::Template->new(
filename => "$config{templatedir}/recentchanges.tmpl"
);
styleurl => styleurl(),
baseurl => "$config{url}/",
);
- require Encode;
- print $q->header(-charset=>'utf-8'), Encode::decode_utf8($template->output);
+ print $q->header(-charset=>'utf-8'), $template->output;
} #}}}
sub cgi_signin ($$) { #{{{