Changeset 32500

Show
Ignore:
Timestamp:
05.10.2018 16:48:04 (11 months ago)
Author:
ak19
Message:

For a test case, best_encoding come out with prefix/suffix to utf_8, so allowing for that

Files:
1 modified

Legend:

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

    r32096 r32500  
    422422        $best_encoding =~ s/-+/_/g; 
    423423        $best_encoding = lc($best_encoding); # lowercase 
    424         if ($best_encoding eq "utf_8") { $best_encoding = "utf8" } 
     424        if ($best_encoding eq "utf_8" ||  $best_encoding =~ /utf_8/) { $best_encoding = "utf8" } 
    425425        $found_html_encoding = 1; 
    426426        # We shouldn't be modifying this here!!