So anyway, here's an ugly work-around:
in LocalFile.pm, near line 335:
Code:
--------------------
elsif ( $type =~ /html/ ) {
require HTML::FormatText;
require File::BOM;
my $htmlfh;
my $encoding = File::BOM::open_bom($htmlfh, $path);
close $htmlfh;
if ( $encoding ){
main::DEBUGLOG && $log->debug("Encoding of $path is
$encoding ..");
if ( open($htmlfh, "<:encoding($encoding)", $path) ){
$content = do { local $/; <$htmlfh> }; # read
all content from file
close $htmlfh;
$content = HTML::FormatText->format_string(
$content,
leftmargin => 0,
);
}
} else {
$content = HTML::FormatText->format_file(
$path,
leftmargin => 0,
);
}
}
--------------------
This seems to work with both plain-text & UTF-8 html files. I haven't
tested it on UTF-8 files w/o a BOM, though.
------------------------------------------------------------------------
gharris999's Profile: http://forums.slimdevices.com/member.php?userid=115
View this thread: http://forums.slimdevices.com/showthread.php?t=99537
_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins