Changeset 24736 for main/trunk


Ignore:
Timestamp:
2011-10-07T17:25:23+13:00 (13 years ago)
Author:
ak19
Message:

Perl strings that result from reading in data from text files need to be Unicode aware strings.

File:
1 edited

Legend:

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

    r24547 r24736  
    118118    &util::block_filename($block_hash,$filename);
    119119
     120
    120121    # Read the CSV file to get the metadata
    121122    my $csv_file_content;
     
    124125    $csv_file_reader->set_handle('MetadataCSVPlugin::CSV_FILE');
    125126    $csv_file_reader->read_file(\$csv_file_content);
     127
     128    # Would be nice if MetadataCSVPlugin was extended to support a minus
     129    # option to choose the character encoding the CSV file is in
     130    # For now we will assume it is always in UTF8
     131    $csv_file_content = decode("utf8",$csv_file_content);
     132
    126133    close(CSV_FILE);
    127134
Note: See TracChangeset for help on using the changeset viewer.