+18Jun06=======================================================================
+1. add a optional dependency on Encode (included in 5.8.x) to encode strings
+to latin1 for deduping purposes, hopefully getting rid of some dupes.
13Jun06=======================================================================
1. start using git.
2. change all the version / build numbering.
01Jan04=======================================================================
1. move position of USDB init to get rid of an obscure bug pointed out by
Charlie K1XX.
-2. Remove redundant documentation
+2. Remove redundant documentation.
31Dec03=======================================================================
1. alter remote database handling to 'new standard'.
30Dec03=======================================================================
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;
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;
}
}
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;
$zombies $root @listeners $lang $myalias @debug $userfn $clusteraddr
$clusterport $mycall $decease $is_win $routeroot $me $reqreg $bumpexisting
$allowdxby $dbh $dsn $dbuser $dbpass $do_xml $systime_days $systime_daystart
+ $can_encode
);
@inqueue = (); # the main input queue, an array of hashes
$dbh = $dbh->connect($dsn, $dbuser, $dbpass) if $dbh;
}
+# try to load Encode
+{
+ no warnings;
+ my $w = $SIG{__DIE__};
+ $SIG{__DIE__} = 'IGNORE';
+ eval { require Encode; };
+ unless ($@) {
+ import Encode;
+ $can_encode = 1;
+ }
+ $SIG{__DIE__} = $w;
+}
+
# try to load XML::Simple
DXXml::init();