Ignore:
Timestamp:
2010-12-06T13:15:10+13:00 (13 years ago)
Author:
davidb
Message:

Further changes to deal with documents that use different filename encodings on the file-system. Now sets UTF8URL metadata to perform the cross-document look up. Files stored in doc.pm as associated files are now always raw filenames (rather than potentially UTF8 encoded). Storing of filenames seen by HTMLPlug when scanning for files to block on is now done in Unicode aware strings rather than utf8 but unware strings.

File:
1 edited

Legend:

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

    r23364 r23387  
    927927
    928928    # UTF-8 version of filename
    929     if ((defined $ENV{"DEBUG_UNICODE"}) && ($ENV{"DEBUG_UNICODE"})) {
    930     print STDERR "**** Setting Source Metadata given: $octet_file\n";
    931     }
     929#    if ((defined $ENV{"DEBUG_UNICODE"}) && ($ENV{"DEBUG_UNICODE"})) {
     930#   print STDERR "**** Setting Source Metadata given: $octet_file\n";
     931#    }
    932932   
    933933    # Deal with (on Windows) raw filenames that are in their
     
    937937    if ((defined $filename_encoding) && ($filename_encoding eq "unicode")) {
    938938        if (-e $raw_filename) {
    939         require Win32;
    940        
    941 ##      print STDERR "**** raw filename before LPN: $raw_filename\n";
    942939        my $unicode_filename = Win32::GetLongPathName($raw_filename);
    943940       
    944941        my $unused_full_uf;
    945942        ($unused_full_uf, $octet_file) = &util::get_full_filenames("", $unicode_filename);
    946 
    947 ##      print STDERR "**** raw filename after LPN: $raw_filename\n";       
    948943        }
    949944    }
     
    962957    }
    963958   
    964     if ((defined $ENV{"DEBUG_UNICODE"}) && ($ENV{"DEBUG_UNICODE"})) {
    965     print STDERR "****** saving Source as:             $url_encoded_filename\n";
    966     }
     959#    if ((defined $ENV{"DEBUG_UNICODE"}) && ($ENV{"DEBUG_UNICODE"})) {
     960#   print STDERR "****** saving Source as:             $url_encoded_filename\n";
     961#    }
    967962   
    968963   
     
    978973                    $renamed_raw_url);
    979974
    980     if ((defined $ENV{"DEBUG_UNICODE"}) && ($ENV{"DEBUG_UNICODE"})) {
    981     print STDERR "****** saving SourceFile as:         $renamed_raw_url\n";
    982     }
     975#    if ((defined $ENV{"DEBUG_UNICODE"}) && ($ENV{"DEBUG_UNICODE"})) {
     976#   print STDERR "****** saving SourceFile as:         $renamed_raw_url\n";
     977#    }
    983978}
    984979   
Note: See TracChangeset for help on using the changeset viewer.