Changeset 16667


Ignore:
Timestamp:
2008-08-07T12:56:50+12:00 (16 years ago)
Author:
kjdon
Message:

get_language_encoding was setting ->input_encoding, which means its wrong for all the next files. Changed this.

File:
1 edited

Legend:

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

    r16642 r16667  
    292292    }
    293293   
    294 
     294    my $found_html_encoding = 0;
    295295    # handle html files specially
    296296    # XXX this doesn't match plugins derived from HTMLPlug (except ConvertTo)
     
    312312        $best_encoding = lc($best_encoding); # lowercase
    313313        if ($best_encoding eq "utf_8") { $best_encoding = "utf8" }
    314         $self->{'input_encoding'} = $best_encoding;
     314        $found_html_encoding = 1;
     315        # We shouldn't be modifying this here!!
     316        #$self->{'input_encoding'} = $best_encoding;
    315317    }
    316318       
     
    355357        }       
    356358        $best_language = $self->{'default_language'};
    357         $best_encoding = $self->{'input_encoding'};
     359        if (!$found_html_encoding) {
     360        $best_encoding = $self->{'input_encoding'};
     361        }
    358362
    359363    } else {
Note: See TracChangeset for help on using the changeset viewer.