my $scriptsdir = $documentroot . 'library/';
my %formatmap = (
- ".ma" => "grafite",
- ".c" => "c", # debug
+ '.ma' => 'grafite',
+ '.c' => 'c', # debug
);
# Code
my $query = CGI->new; # used globally by some 'sub' below
-print $query->header;
+print $query->header(-type=>'text/html', -charset=>'utf-8');
sub die_invalid_file() {
print $query->start_html;
my ($script, $format) = lookup_script($fname);
open SCRIPT, "< $script" or die "Can't open Matita script \"$script\"\n";
my @lines = <SCRIPT>;
-my $text = join "", @lines;
+my $text = join '', @lines;
close SCRIPT;
-print $query->start_html(-style=>{"src"=>"/$format-format.css"});
+print $query->start_html(-style=>{'src'=>"/$format-format.css"},
+ -encoding=>'utf-8');
my $result = $highlighter->highlight($format, $text);
print "<pre>\n";
print $result;