Changeset 16580

Show
Ignore:
Timestamp:
29.07.2008 13:29:21 (11 years ago)
Author:
ak19
Message:

Shared subroutine tmp_area_convert_file now ensures that the tailname of the file is utf8 by calling superclass BasePlugin?'s filepath_to_utf8 on it.

Location:
gsdl/trunk/perllib/plugins
Files:
4 modified

Legend:

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

    r16392 r16580  
    489489    $tailname =~ s/\.+//g; 
    490490    $tailname =~ s/\-+//g; 
     491 
     492    $tailname = $self->SUPER::filepath_to_utf8($tailname) unless &unicode::check_is_utf8($tailname); 
    491493    $suffix = lc($suffix); 
    492494    my $tmp_filename = &util::filename_cat($tmp_dirname, "$tailname$suffix"); 
  • gsdl/trunk/perllib/plugins/ConvertBinaryFile.pm

    r16392 r16580  
    278278    # convert to utf-8 otherwise we have problems with the doc.xml file 
    279279    # later on 
    280     &unicode::ensure_utf8(\$tailname); 
     280    print STDERR "**** filename $tailname$suffix is already UTF8\n" if &unicode::check_is_utf8($tailname); 
     281    $tailname = $self->SUPER::filepath_to_utf8($tailname) unless &unicode::check_is_utf8($tailname); 
    281282 
    282283    $suffix = lc($suffix); 
     
    375376    my $conv_filename = ""; 
    376377    $conv_filename = $self->tmp_area_convert_file($output_ext, $filename_full_path); 
    377      
     378         
    378379    if ("$conv_filename" eq "") {return -1;} # had an error, will be passed down pipeline  
    379380    if (! -e "$conv_filename") {return -1;}  
  • gsdl/trunk/perllib/plugins/ConvertToRogPlugin.pm

    r16392 r16580  
    104104    # Remove any white space from filename -- no risk of name collision, and 
    105105    # makes later conversion by utils simpler. Leave spaces in path... 
    106     $tailname =~ s/\s+//g;  
     106    $tailname =~ s/\s+//g; 
     107    $tailname = $self->SUPER::filepath_to_utf8($tailname) unless &unicode::check_is_utf8($tailname); 
    107108 
    108109    my $tmp_filename = &util::filename_cat($tmp_dirname, "$tailname$suffix"); 
  • gsdl/trunk/perllib/plugins/TextPlugin.pm

    r16301 r16580  
    170170    # convert to utf-8 otherwise we have problems with the doc.xml file 
    171171    # later on 
    172     &unicode::ensure_utf8(\$tailname); # TODO: does this change the filename or not? 
    173              # need to test this out on a windows computer using a Greek filename 
     172    $tailname = $self->SUPER::filepath_to_utf8($tailname) unless &unicode::check_is_utf8($tailname); 
     173 
    174174    $suffix = lc($suffix); 
    175175    my $tmp_filename = &util::filename_cat($tmp_dirname, "$tailname$suffix");