use warnings;
use strict;
use IkiWiki 2.00;
+use Encode;
sub import { #{{{
hook(type => "htmlize", id => "txtl", call => \&htmlize);
sub htmlize (@) { #{{{
my %params=@_;
- my $content = $params{content};
+ my $content = decode_utf8(encode_utf8($params{content}));
eval q{use Text::Textile};
return $content if $@;
* hnb: New plugin, contributed by Axel Beckert.
* meta: Store "description" in pagestate for use by other plugins.
* map: Support show=description.
+ * textile: The Text::Textile perl module has some regexps that fail if
+ input is flagged as utf-8, but contains invalid characters such as 0x92.
+ To prevent it from crashing, re-encode the content before calling it,
+ which will ensure that it's really utf-8.
-- Joey Hess <joeyh@debian.org> Sun, 15 Jun 2008 15:03:33 -0400
0x92 is "single quote" in the evil windows default codepage. It would be nice to handle this gracefully and not abort ikiwiki at this point, or alternatively, die fatally but mention which input page caused the error.
Interestingly enough, in my case, the input file has several other bad windows characters (0xFC, u-umlaut) which have not caused ikiwiki to abort. ikiwiki version 2.50. -- [[JonDowland]]
+
+> Fixed in git. [[done]] --[[Joey]]