styleurl => styleurl(),
baseurl => "$config{url}/",
);
- print $q->header, $template->output;
+ require Encode;
+ print $q->header(-charset=>'utf-8'), Encode::decode_utf8($template->output);
} #}}}
sub cgi_signin ($$) { #{{{
title => "signin",
fields => [qw(do title page subpage from name password confirm_password email)],
header => 1,
+ charset => "utf-8",
method => 'POST',
validate => {
confirm_password => {
$form->field(name => "confirm_password", type => "hidden");
$form->field(name => "email", type => "hidden");
$form->text("Registration successful. Now you can Login.");
- print $session->header();
+ print $session->header(-charset=>'utf-8');
print misctemplate($form->title, $form->render(submit => ["Login"]));
}
else {
$form->text("Your password has been emailed to you.");
$form->field(name => "name", required => 0);
- print $session->header();
+ print $session->header(-charset=>'utf-8');
print misctemplate($form->title, $form->render(submit => ["Login", "Register", "Mail Password"]));
}
}
else {
- print $session->header();
+ print $session->header(-charset=>'utf-8');
print misctemplate($form->title, $form->render(submit => ["Login", "Register", "Mail Password"]));
}
} #}}}
fields => [qw(do name password confirm_password email
subscriptions locked_pages)],
header => 0,
+ charset => "utf-8",
method => 'POST',
validate => {
confirm_password => {
$form->text("Preferences saved.");
}
- print $session->header();
+ print $session->header(-charset=>'utf-8');
print misctemplate($form->title, $form->render(submit => \@buttons));
} #}}}
my $form = CGI::FormBuilder->new(
fields => [qw(do rcsinfo subpage from page editcontent comments)],
header => 1,
+ charset => "utf-8",
method => 'POST',
validate => {
editcontent => '/.+/',
! length $form->field('editcontent')) {
my $content="";
if (exists $pagesources{lc($page)}) {
- $content=readfile(srcfile($pagesources{lc($page)}));
+ require Encode;
+ $content=Encode::decode_utf8(readfile(srcfile($pagesources{lc($page)})));
$content=~s/\n/\r\n/g;
}
$form->field(name => "editcontent", value => $content,
}
if (defined $form->field('comments') &&
length $form->field('comments')) {
- $message.=": ".$form->field('comments');
+ require Encode;
+ $message.=Encode::decode_utf8(": ".$form->field('comments'));
}
if ($config{rcs}) {
* Doc updates for git.
* Fix absolute url munging in rss generation to support https, ftp, etc urls
not just http urls.
+ * Patch from Recai Oktaş to improve utf-8 support, it should now use proper
+ utf-8 for edit and other fields, and for recentchanges. There may still
+ be utf-8 issues with the preferences page though.
- -- Joey Hess <joeyh@debian.org> Thu, 8 Jun 2006 02:05:57 -0400
+ -- Joey Hess <joeyh@debian.org> Sun, 11 Jun 2006 14:48:41 -0400
ikiwiki (1.4) unstable; urgency=low