X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/39e5e250006421535c13b97e9ca28600c8447877..80edf46ff216a547676de9e7902072777f715a35:/IkiWiki/Plugin/highlight.pm diff --git a/IkiWiki/Plugin/highlight.pm b/IkiWiki/Plugin/highlight.pm index 4c02f6c23..9bdde85ae 100644 --- a/IkiWiki/Plugin/highlight.pm +++ b/IkiWiki/Plugin/highlight.pm @@ -4,6 +4,7 @@ package IkiWiki::Plugin::highlight; use warnings; use strict; use IkiWiki 3.00; +use Encode; # locations of highlight's files my $filetypes="/etc/highlight/filetypes.conf"; @@ -69,7 +70,7 @@ sub htmlizefallback { return; } - return highlight($langfile, shift); + return Encode::decode_utf8(highlight($langfile, shift)); } my %ext2lang; @@ -128,8 +129,8 @@ sub highlight ($$) { $gen = highlightc::CodeGenerator_getInstance($highlightc::XHTML); $gen->setFragmentCode(1); # generate html fragment $gen->setHTMLEnclosePreTag(1); # include stylish
- $gen->initLanguage($langfile); $gen->initTheme("/dev/null"); # theme is not needed because CSS is not emitted + $gen->initLanguage($langfile); # must come after initTheme $gen->setEncoding("utf-8"); $highlighters{$langfile}=$gen; }