Ignore:
Timestamp:
2010-11-26T12:09:53+13:00 (13 years ago)
Author:
davidb
Message:

More careful use of encoding parameter to $self->set_Source_metadata so it reflects the *filename* encoding that Greenstone has worked out, not the encoding for the *content* of the file, which of course could be completely different!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/plugins/OpenDocumentPlugin.pm

    r23248 r23349  
    264264    $doc_obj->add_metadata ("", "srclink_file", $doc_obj->get_sourcefile());
    265265    $doc_obj->add_utf8_metadata ("", "srcicon",  "<img border=\"0\" align=\"absmiddle\" src=\"_httpprefix_/collect/[collection]/index/assoc/[assocfilepath]/thumbnail.png\" alt=\"View the Open document\" title=\"View the Open document\">");
    266     $self->set_Source_metadata($doc_obj, $file_only);
     266
     267    my $plugin_filename_encoding = $self->{'filename_encoding'};
     268    my $filename_encoding = $self->deduce_filename_encoding($file_only,$metadata,$plugin_filename_encoding);
     269
     270    $self->set_Source_metadata($doc_obj, $file_only, $filename_encoding);
    267271     $doc_obj->set_utf8_metadata_element("", "FileSize", (-s $filename));
    268272     
Note: See TracChangeset for help on using the changeset viewer.