Changeset 15843 for gsdl


Ignore:
Timestamp:
2008-06-03T17:29:14+12:00 (16 years ago)
Author:
ak19
Message:

The file URL added to doc.xml as Image and Source metadata is first converted to utf8 using filename_to_metadata, and then subroutine add_utf8_metadata is used rather than add_metadata for adding this URL to the doc.xml. Now images whose filenames use special characters for foreign languages display in the Image view. Generated a GS2 image collection including imgs using special chars on Linux, and viewed it both in Windows and Linux.

File:
1 edited

Legend:

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

    r15177 r15843  
    189189    ##$url =~ s/ /%20/g;
    190190
    191     $doc_obj->add_metadata ($section, "Image", $url);
     191    my $utf8_filename_meta = $self->filename_to_metadata($url);
     192    $doc_obj->add_utf8_metadata ($section, "Image", $utf8_filename_meta);
    192193
    193194    # Also want to set filename as 'Source' metadata to be
    194195    # consistent with other plugins
    195     $doc_obj->add_metadata ($section, "Source", $self->filename_to_metadata($url));
     196    $doc_obj->add_utf8_metadata ($section, "Source", $utf8_filename_meta);
    196197
    197198    my ($image_type, $image_width, $image_height, $image_size)
Note: See TracChangeset for help on using the changeset viewer.