]> ruin.nu Git - ndwebbie.git/blobdiff - scripts/ndreport.pl
Fix email decoding
[ndwebbie.git] / scripts / ndreport.pl
index 079b3f9f20d4d0e47d9b3737e4cdbcf60d2be077..8f2cd3b7aaeb541a07266a2605ff19246c1d61d0 100755 (executable)
@@ -28,7 +28,7 @@ use DBD::Pg qw(:pg_types);
 use CGI qw/:standard/;
 
 use Email::Simple;
-use Encode::Encoder qw(encoder);
+use Encode;
 use MIME::QuotedPrint;
 
 use FindBin;
@@ -46,7 +46,7 @@ my $user = $1;
 
 my $email = Email::Simple->new($text);
 
-my $body =  encoder($email->body,'ISO-8859-15')->utf8;
+my $body =  decode('ISO-8859-1', $email->body);
 
 my $c = $dbh->prepare(q{
 SELECT coords(x,y,z) FROM current_planet_stats WHERE pid = (SELECT pid FROM users WHERE username = $1