Changeset 16555

Show
Ignore:
Timestamp:
25.07.2008 16:54:47 (11 years ago)
Author:
ak19
Message:

Instead of sub get_language_encoding applying function ensure_utf8 on a copy of the text string to find out if this string is utf8, it uses the new sub check_is_utf8 instead

Files:
1 modified

Legend:

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

    r16392 r16555  
    400400    } 
    401401 
    402     my $text_copy = $text; 
    403     if ($best_encoding =~ /^iso_8859/ && unicode::ensure_utf8(\$text_copy)==0) { 
     402    if ($best_encoding =~ /^iso_8859/ && &unicode::check_is_utf8($text)) { 
    404403    # the text is valid utf8, so assume that's the real encoding 
    405404    # (since textcat is based on probabilities)