remove all $Id$ strings
[spider.git] / perl / AnnTalk.pm
index 443e7442169c705344a1c2c4fe8af5529eb52dfa..a38f9cb3b7459a98317da876b61cabd07263f0df 100644 (file)
@@ -3,7 +3,7 @@
 #
 # Copyright (c) 2000 Dirk Koopman
 #
-# $Id$
+#
 #
 
 package AnnTalk;
@@ -47,6 +47,7 @@ sub dup
        chomp $text;
        unpad($text);
        $text =~ s/\%([0-9A-F][0-9A-F])/chr(hex($1))/eg;
+       $text = Encode::encode("iso-8859-1", $text) if $main::can_encode && Encode::is_utf8($text, 1);
        $text = pack("C*", map {$_ & 127} unpack("C*", $text));
        $text =~ s/[^\#a-zA-Z0-9]//g;
        $text = substr($text, 0, $duplth) if length $text > $duplth;