Changeset 13545


Ignore:
Timestamp:
2007-01-08T16:48:43+13:00 (15 years ago)
Author:
shaoqun
Message:

made it do the correct string comparison on unicode filenames

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/perllib/plugins/RecPlug.pm

    r13417 r13545  
    102102use strict;
    103103no strict 'refs';
     104use Encode;
    104105
    105106BEGIN {
     
    401402    &metadatautil::combine_metadata_structures($out_metadata, $in_metadata);
    402403
     404        ## encode the filename as perl5 doesn't handle unicode filenames       
     405        my $tmpfile = Encode::encode_utf8($subfile);
     406
    403407    # Next add metadata read in XML files (if it is supplied)
    404408    if ($additionalmetadata == 1) {
     
    406410        my ($filespec, $mdref);
    407411        foreach $filespec (@extrametakeys) {
    408         if ($subfile =~ /^$filespec$/) {
     412                ## use the utf8 encoded filename to do the filename comparison
     413        if ($tmpfile =~ /^$filespec$/) {
    409414            print $outhandle "File \"$subfile\" matches filespec \"$filespec\"\n"
    410415            if ($verbosity > 2);
Note: See TracChangeset for help on using the changeset viewer.