Changeset 23347 for main/trunk/greenstone2/perllib/plugins/HTMLPlugin.pm
- Timestamp:
- 2010-11-26T09:43:59+13:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/plugins/HTMLPlugin.pm
r23335 r23347 379 379 380 380 my ($tailname,$dirname) = &File::Basename::fileparse($file); 381 print STDERR "***!! file = $file\n"; 381 382 382 # my $utf8_file = $self->filename_to_utf8_metadata($file); 383 383 # $utf8_file =~ s/&\#095;/_/g; 384 384 my $utf8_file = &unicode::raw_filename_to_url_encoded($tailname); 385 print STDERR "***!! utf8_file = $utf8_file\n"; 385 386 if ((defined $ENV{"DEBUG_UNICODE"}) && ($ENV{"DEBUG_UNICODE"})) { 387 print STDERR "***!! file = $file\n"; 388 print STDERR "***!! utf8_file = $utf8_file\n"; 389 } 390 386 391 387 392 my $web_url = "http://"; … … 758 763 759 764 # If web page didn't give encoding, then default to utf8 760 print "*************** looking up $file\n"; 765 if ((defined $ENV{"DEBUG_UNICODE"}) && ($ENV{"DEBUG_UNICODE"})) { 766 print STDERR "*** Web page didn't give encoding, defaulting to UTF8!\n"; 767 print STDERR "***** looking up $file\n"; 768 } 761 769 762 770 my $content_encoding= $self->{'content_encoding'} || "utf8"; … … 767 775 768 776 &ghtml::urlsafe ($href); 769 print STDERR "***!!! href=$href\n"; 777 if ((defined $ENV{"DEBUG_UNICODE"}) && ($ENV{"DEBUG_UNICODE"})) { 778 print STDERR "***!!! href=$href\n"; 779 } 780 770 781 771 782 return $front . "_httpextlink_&rl=" . $rl . "&href=" . $href . $hash_part . $back; … … 818 829 if (!-e $filename) { 819 830 # try the original filename stored in map 820 print STDERR "***###!! orig filename did not exist: $filename\n"; 831 if ((defined $ENV{"DEBUG_UNICODE"}) && ($ENV{"DEBUG_UNICODE"})) { 832 print STDERR "***###!! orig filename did not exist: $filename\n"; 833 } 821 834 822 835 my $original_filename = $self->{'utf8_to_original_filename'}->{$utf8_filename}; 823 836 824 print STDERR "**** Trying for $original_filename\n"; 837 if ((defined $ENV{"DEBUG_UNICODE"}) && ($ENV{"DEBUG_UNICODE"})) { 838 print STDERR "**** Trying for $original_filename\n"; 839 } 825 840 826 841 if (defined $original_filename && -e $original_filename) { 827 print STDERR "*** found match\n"; 842 if ((defined $ENV{"DEBUG_UNICODE"}) && ($ENV{"DEBUG_UNICODE"})) { 843 print STDERR "*** found match\n"; 844 } 828 845 $filename = $original_filename; 829 846 } … … 1164 1181 $title =~ s/^$self->{'title_sub'}// if ($self->{'title_sub'}); 1165 1182 $title =~ s/^\s+//s; # in case title_sub introduced any... 1166 print STDERR "**** adding Title: ", Encode::encode("utf8",$title), "\n";1167 1183 $doc_obj->add_utf8_metadata ($section, "Title", $title); 1168 1184 print $outhandle " extracted Title metadata \"$title\" from $from\n"
Note:
See TracChangeset
for help on using the changeset viewer.