Changeset 22842

Show
Ignore:
Timestamp:
02.09.2010 14:20:43 (9 years ago)
Author:
davidb
Message:

Minor tidy up of code

Files:
1 modified

Legend:

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

    r22689 r22842  
    3535 
    3636package HTMLPlugin; 
     37 
     38use Encode; 
    3739 
    3840use ReadTextFile; 
     
    12301232    # Convert entities to their UTF8 equivalents 
    12311233    $$textref =~ s/&(lt|gt|amp|quot|nbsp);/&z$1;/go; 
    1232     $$textref =~ s/&([^;]+);/&ghtml::getcharequiv($1,1)/gseo; 
     1234    $$textref =~ s/&([^;]+);/&Encode::decode("utf8",ghtml::getcharequiv($1,1))/gseo; 
    12331235    $$textref =~ s/&z(lt|gt|amp|quot|nbsp);/&$1;/go; 
     1236 
    12341237} 
    12351238 
     
    15861589    close (PROD) || die("Error Closing File: $tmp_filename $!"); 
    15871590 
    1588  
    1589 ###    my ($language, $encoding) = $self->textcat_get_language_encoding ($input_filename); 
    1590 ###    #print STDERR "*** encoding = $encoding\n"; 
    1591  
    15921591    # run html-tidy on the tmp file to make it a proper XML file 
    15931592 
     
    15971596    my $tidy_cmd = "tidy"; 
    15981597    $tidy_cmd .= " -q" if ($self->{'verbosity'} <= 2); 
    1599 ##    $tidy_cmd .= " -utf8 -wrap 0 -asxml \"$tmp_filename\""; 
    16001598    $tidy_cmd .= " -raw -wrap 0 -asxml \"$tmp_filename\""; 
    16011599    if ($self->{'verbosity'} <= 2) {