lib/PublicInbox/SolverGit.pm | 8 ++++++++ diff --git a/lib/PublicInbox/SolverGit.pm b/lib/PublicInbox/SolverGit.pm index 8fde2329fa757a639aba76375c4ab63ffa55ab1b..612f495bd3bc2ba0c9a0d51b11a82a348865f72e 100644 --- a/lib/PublicInbox/SolverGit.pm +++ b/lib/PublicInbox/SolverGit.pm @@ -78,6 +78,14 @@ my $ct = $part->content_type || 'text/plain'; my ($s, undef) = msg_part_text($part, $ct); defined $s or return; my $di = {}; + + # Email::MIME::Encodings forces QP to be CRLF upon decoding, + # change it back to LF: + my $cte = $part->header('Content-Transfer-Encoding') || ''; + if ($cte =~ /\bquoted-printable\b/i && $part->crlf eq "\n") { + $s =~ s/\r\n/\n/sg; + } + foreach my $l (split(/^/m, $s)) { if ($l =~ $re) { $di->{oid_a} = $1;