Changeset 31491 for main/trunk


Ignore:
Timestamp:
2017-03-13T09:46:17+13:00 (7 years ago)
Author:
kjdon
Message:

need to normalize the name when we look up in hte block hash too, for macos

File:
1 edited

Legend:

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

    r31487 r31491  
    3232
    3333use encodings;
     34use Unicode::Normalize 'normalize';
    3435
    3536use PrintInfo;
     
    639640    }
    640641    }
     642    elsif ($ENV{'GSDLOS'} =~ m/^darwin$/) {
     643
     644    # on mac, we want composed form in the block hash   
     645        my $composed_form = normalize('C', $filename_full_path);
     646        print STDERR "gsdlos = darwin, composed = ". &unicode::debug_unicode_string($composed_form) ."\n";
     647        if (defined $block_hash->{'file_blocks'}->{$composed_form}) {
     648            $self->{'num_blocked'} ++;
     649            print STDERR "BLOCKED 1\n";
     650            return 1;
     651        }
     652    }
     653
    641654    else {
    642655    if (defined $block_hash->{'file_blocks'}->{$filename_full_path}) {
Note: See TracChangeset for help on using the changeset viewer.