aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki.pm
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-07-03 20:12:27 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-07-03 20:12:27 +0000
commitfa9517e5bb07fad29fddb219e6c8e8f1b0a08d7e (patch)
treed04771c376accfbf57a699f728da095a30f23702 /IkiWiki.pm
parent117e71ec9b4fe6a37fd9fa07b8fa2117306bb9a6 (diff)
downloadikiwiki-fa9517e5bb07fad29fddb219e6c8e8f1b0a08d7e.tar
ikiwiki-fa9517e5bb07fad29fddb219e6c8e8f1b0a08d7e.tar.gz
* Support pages with utf8 filenames. Patch by Faidon Liambotis.
Diffstat (limited to 'IkiWiki.pm')
-rw-r--r--IkiWiki.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm
index e86581415..4be5612f1 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
@@ -3,6 +3,7 @@
package IkiWiki;
use warnings;
use strict;
+use encoding "utf8";
use vars qw{%config %links %oldlinks %oldpagemtime %pagectime
%renderedfiles %pagesources %depends %hooks};
@@ -340,7 +341,7 @@ sub unlockwiki () { #{{{
} #}}}
sub loadindex () { #{{{
- open (IN, "$config{wikistatedir}/index") || return;
+ open (IN, "<:utf8", "$config{wikistatedir}/index") || return;
while (<IN>) {
$_=possibly_foolish_untaint($_);
chomp;
@@ -372,7 +373,7 @@ sub saveindex () { #{{{
if (! -d $config{wikistatedir}) {
mkdir($config{wikistatedir});
}
- open (OUT, ">$config{wikistatedir}/index") ||
+ open (OUT, ">:utf8", "$config{wikistatedir}/index") ||
error("cannot write to $config{wikistatedir}/index: $!");
foreach my $page (keys %oldpagemtime) {
next unless $oldpagemtime{$page};