Encode is used in nearly all code paths so stop loading it on demand
parent
fa9517e5bb
commit
929b9de9c2
|
@ -3,7 +3,8 @@
|
||||||
package IkiWiki;
|
package IkiWiki;
|
||||||
use warnings;
|
use warnings;
|
||||||
use strict;
|
use strict;
|
||||||
use encoding "utf8";
|
use encoding "utf8"; # force use of utf8 for io layer
|
||||||
|
use Encode;
|
||||||
|
|
||||||
use vars qw{%config %links %oldlinks %oldpagemtime %pagectime
|
use vars qw{%config %links %oldlinks %oldpagemtime %pagectime
|
||||||
%renderedfiles %pagesources %depends %hooks};
|
%renderedfiles %pagesources %depends %hooks};
|
||||||
|
@ -393,7 +394,6 @@ sub saveindex () { #{{{
|
||||||
sub template_params (@) { #{{{
|
sub template_params (@) { #{{{
|
||||||
my $filename=shift;
|
my $filename=shift;
|
||||||
|
|
||||||
require Encode;
|
|
||||||
require HTML::Template;
|
require HTML::Template;
|
||||||
return filter => sub {
|
return filter => sub {
|
||||||
my $text_ref = shift;
|
my $text_ref = shift;
|
||||||
|
|
|
@ -5,6 +5,7 @@ use strict;
|
||||||
use IkiWiki;
|
use IkiWiki;
|
||||||
use IkiWiki::UserInfo;
|
use IkiWiki::UserInfo;
|
||||||
use encoding 'utf8'; # force use of utf8 for io layer
|
use encoding 'utf8'; # force use of utf8 for io layer
|
||||||
|
use Encode;
|
||||||
|
|
||||||
package IkiWiki;
|
package IkiWiki;
|
||||||
|
|
||||||
|
@ -352,7 +353,6 @@ sub cgi_editpage ($$) { #{{{
|
||||||
require IkiWiki::Render;
|
require IkiWiki::Render;
|
||||||
# Apparently FormBuilder doesn't not treat input as
|
# Apparently FormBuilder doesn't not treat input as
|
||||||
# utf-8, so decode from it.
|
# utf-8, so decode from it.
|
||||||
require Encode;
|
|
||||||
my $content = Encode::decode_utf8($form->field('editcontent'));
|
my $content = Encode::decode_utf8($form->field('editcontent'));
|
||||||
my $comments = Encode::decode_utf8($form->field('comments'));
|
my $comments = Encode::decode_utf8($form->field('comments'));
|
||||||
$form->field(name => "editcontent",
|
$form->field(name => "editcontent",
|
||||||
|
@ -442,7 +442,6 @@ sub cgi_editpage ($$) { #{{{
|
||||||
page_locked($page, $session);
|
page_locked($page, $session);
|
||||||
|
|
||||||
# Decode utf-8 since FormBuilder does not
|
# Decode utf-8 since FormBuilder does not
|
||||||
require Encode;
|
|
||||||
my $content=Encode::decode_utf8($form->field('editcontent'));
|
my $content=Encode::decode_utf8($form->field('editcontent'));
|
||||||
|
|
||||||
$content=~s/\r\n/\n/g;
|
$content=~s/\r\n/\n/g;
|
||||||
|
|
|
@ -6,6 +6,7 @@ use warnings;
|
||||||
use strict;
|
use strict;
|
||||||
use File::Spec;
|
use File::Spec;
|
||||||
use IkiWiki;
|
use IkiWiki;
|
||||||
|
use Encode;
|
||||||
|
|
||||||
sub linkify ($$$) { #{{{
|
sub linkify ($$$) { #{{{
|
||||||
my $lpage=shift;
|
my $lpage=shift;
|
||||||
|
@ -31,7 +32,6 @@ sub htmlize ($$) { #{{{
|
||||||
$blosxom::version="is a proper perl module too much to ask?";
|
$blosxom::version="is a proper perl module too much to ask?";
|
||||||
use warnings 'all';
|
use warnings 'all';
|
||||||
do "/usr/bin/markdown";
|
do "/usr/bin/markdown";
|
||||||
require Encode;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($type eq '.mdwn') {
|
if ($type eq '.mdwn') {
|
||||||
|
@ -324,7 +324,6 @@ sub refresh () { #{{{
|
||||||
my %exists;
|
my %exists;
|
||||||
my @files;
|
my @files;
|
||||||
eval q{use File::Find};
|
eval q{use File::Find};
|
||||||
require Encode;
|
|
||||||
find({
|
find({
|
||||||
no_chdir => 1,
|
no_chdir => 1,
|
||||||
wanted => sub {
|
wanted => sub {
|
||||||
|
|
|
@ -24,7 +24,7 @@ ikiwiki (1.8) UNRELEASED; urgency=low
|
||||||
to be read as utf8.
|
to be read as utf8.
|
||||||
* Support pages with utf8 filenames. Patch by Faidon Liambotis.
|
* Support pages with utf8 filenames. Patch by Faidon Liambotis.
|
||||||
|
|
||||||
-- Joey Hess <joeyh@debian.org> Mon, 3 Jul 2006 16:09:16 -0400
|
-- Joey Hess <joeyh@debian.org> Mon, 3 Jul 2006 16:17:20 -0400
|
||||||
|
|
||||||
ikiwiki (1.7) unstable; urgency=low
|
ikiwiki (1.7) unstable; urgency=low
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue