Ignore:
Timestamp:
2008-07-25T16:54:47+12:00 (13 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

File:
1 edited

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)
Note: See TracChangeset for help on using the changeset viewer.