X-Git-Url: https://code.th-h.de/?p=usenet%2Fnewsstats.git;a=blobdiff_plain;f=bin%2Fparsedb.pl;fp=bin%2Fparsedb.pl;h=8004cb1f2d2e35d4a34f51ee89a15929bbd14b22;hp=a5b2ce883794c5698f5e23cd92dfda2f6f90fd4d;hb=b99d41010ddffd330464c6a80da615c232b2832e;hpb=6deb7dbaa46e4c04a7fe372bd4faf04f2b679d31 diff --git a/bin/parsedb.pl b/bin/parsedb.pl index a5b2ce8..8004cb1 100755 --- a/bin/parsedb.pl +++ b/bin/parsedb.pl @@ -198,6 +198,11 @@ while (my $HeadersR = $DBQuery->fetchrow_hashref) { $Headers{$HeaderName.'_parsed'} = decode('MIME-Header',$Headers{$_}) if (exists($LegalEncodings{$Encoding})); } + # forcibly modify headers with un-encoded 8bit data assuming utf-8 + # TODO: try to guess correct enconding + elsif ($Headers{$_} =~ /[^\x00-\x7F]/) { + $Headers{$_} = decode('utf-8',$Headers{$_}); + } # extract name(s) and mail(s) from From: / Sender: / Reply-To: # in parsed form, if available if ($_ ne 'subject') {