summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin
diff options
context:
space:
mode:
authorSimon McVittie <smcv@ http://smcv.pseudorandom.co.uk/>2009-07-26 16:36:17 +0100
committerSimon McVittie <smcv@ http://smcv.pseudorandom.co.uk/>2009-07-26 16:36:17 +0100
commit3f520da78aeda38e47b43b28023b52f321f71291 (patch)
tree7595f4a233e5a1493a31b981c2adfcc0262a49ab /IkiWiki/Plugin
parenteaf59e5ba940b883814c19ae64e68dea4530d992 (diff)
getsource: default to saying page source is in UTF-8, and make the example match the default
IkiWiki mostly assumes that pages are in UTF-8; anyone this doesn't work for can override it in the setup file.
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r--IkiWiki/Plugin/getsource.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/IkiWiki/Plugin/getsource.pm b/IkiWiki/Plugin/getsource.pm
index 2e65df950..08d9d110c 100644
--- a/IkiWiki/Plugin/getsource.pm
+++ b/IkiWiki/Plugin/getsource.pm
@@ -20,7 +20,7 @@ sub getsetup () {
},
getsource_mimetype => {
type => "string",
- example => "application/octet-stream",
+ example => "text/plain; charset=utf-8",
description => "Mime type for returned source.",
safe => 1,
rebuild => 0,
@@ -60,7 +60,7 @@ sub cgi_getsource ($) {
my $data = IkiWiki::readfile(IkiWiki::srcfile($IkiWiki::pagesources{$page}));
if (! $config{getsource_mimetype}) {
- $config{getsource_mimetype} = "text/plain";
+ $config{getsource_mimetype} = "text/plain; charset=utf-8";
}
print "Content-Type: $config{getsource_mimetype}\r\n";