Ignore:
Timestamp:
02/27/17 14:39:50 (4 years ago)
Author:
ak19
Message:

use guess_filesystem_encoding instead of utf8 hard coded. hope it works back on linux, and on mac!

File:
1 edited

Legend:

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

    r31440 r31446  
    12801280
    12811281        my $unicode_dirname ="";
    1282         #my $content_encoding = $self->{'content_encoding'};
    1283         #my $language = $self->{'language'};
    1284 
    1285         # actually I think this is wrong. why should we use content encoding?
    1286         #$self->decode_text($dirname, $content_encoding, $language, \$unicode_dirname);
    1287         #my $filename_encoding = $self->{'filename_encoding'};
    1288         # filename_encoding might be auto...
    1289 
    1290         # TODO what is the best thing to do here?????
    1291         # try and guess default filesystem encoding, similar to deduce_filename_encoding, but without a file?
    1292         my $filename_encoding = "utf8";
     1282        # we need to turn raw filesystem filename into perl unicode aware string 
     1283        my $filename_encoding =  $self->guess_filesystem_encoding(); 
     1284       
    12931285        # copied this from set_Source_metadata in BasePlugin
    12941286        if ((defined $filename_encoding) && ($filename_encoding ne "ascii")) {
     
    13001292        $unicode_dirname = &unicode::raw_filename_to_url_encoded($dirname);
    13011293        }
    1302  
     1294   
    13031295        $before_hash = &FileUtils::filenameConcatenate($unicode_dirname, $before_hash);
    13041296        $before_hash = $self->eval_dir_dots($before_hash);   
Note: See TracChangeset for help on using the changeset viewer.