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/SplitTextFile.pm

    r23212 r23349  
    239239    $doc_obj->add_utf8_metadata($doc_obj->get_top_section(), "Language", $language);
    240240    $doc_obj->add_utf8_metadata($doc_obj->get_top_section(), "Encoding", $encoding);
     241
    241242    my ($filemeta) = $file =~ /([^\\\/]+)$/;
    242     $self->set_Source_metadata($doc_obj, $filemeta, $encoding);
     243    my $plugin_filename_encoding = $self->{'filename_encoding'};
     244    my $filename_encoding = $self->deduce_filename_encoding($file,$metadata,$plugin_filename_encoding);
     245    $self->set_Source_metadata($doc_obj, $filemeta, $filename_encoding);
     246
    243247    $doc_obj->add_utf8_metadata($doc_obj->get_top_section(), "SourceSegment", "$segment");
    244248    if ($self->{'cover_image'}) {
Note: See TracChangeset for help on using the changeset viewer.