X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FSpot.pm;h=5224f11f8bf261007e939299b27138c0a2017526;hb=c62d1dbdc3238711628d49608946eefedda2362e;hp=ed78b40cefb7e22e8c55ffd546c95d50bca344bc;hpb=7b9256ceade8b18b48f848c9ac659c2de7322b0b;p=spider.git diff --git a/perl/Spot.pm b/perl/Spot.pm index ed78b40c..5224f11f 100644 --- a/perl/Spot.pm +++ b/perl/Spot.pm @@ -3,7 +3,7 @@ # # Copyright (c) - 1998 Dirk Koopman G1TLH # -# $Id$ +# # package Spot; @@ -21,7 +21,7 @@ use QSL; use strict; -use vars qw($fp $statp $maxspots $defaultspots $maxdays $dirprefix $duplth $dupage $filterdef $totalspots $hfspots $vhfspots $maxcalllth); +use vars qw($fp $statp $maxspots $defaultspots $maxdays $dirprefix $duplth $dupage $filterdef $totalspots $hfspots $vhfspots $maxcalllth $can_encode); $fp = undef; $statp = undef; @@ -402,6 +402,7 @@ sub dup } } my $otext = $text; + $text = Encode::encode("iso-8859-1", $text) if $main::can_encode && Encode::is_utf8($text, 1); $text =~ s/^\+\w+\s*//; # remove leading LoTW callsign $text = pack("C*", map {$_ & 127} unpack("C*", $text)); $text =~ s/\s{2,}[\dA-Z]?[A-Z]\d?$// if length $text > 24;