X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=lib%2FPublicInbox%2FMsgIter.pm;h=f11ba223c93362a985285555e4113feab87684f1;hb=130af18f06ae9b91e07985ff56b4dd90cedbd744;hp=9e2d797fecc240d4f191ba8f3fe7fd84b410148e;hpb=7d82a8bc04ce2e686371abc6b438ab121b9fa7d0;p=public-inbox.git diff --git a/lib/PublicInbox/MsgIter.pm b/lib/PublicInbox/MsgIter.pm index 9e2d797f..f11ba223 100644 --- a/lib/PublicInbox/MsgIter.pm +++ b/lib/PublicInbox/MsgIter.pm @@ -1,6 +1,7 @@ -# Copyright (C) 2016-2018 all contributors +# Copyright (C) 2016-2019 all contributors # License: AGPL-3.0+ -# + +# read-only utilities for Email::MIME package PublicInbox::MsgIter; use strict; use warnings; @@ -44,7 +45,8 @@ sub msg_part_text ($$) { # times when it should not have been: # <87llgalspt.fsf@free.fr> # <200308111450.h7BEoOu20077@mail.osdl.org> - if ($ct =~ m!\btext/plain\b!i || $ct =~ m!\bmultipart/mixed\b!i) { + if ($err && ($ct =~ m!\btext/plain\b!i || + $ct =~ m!\bmultipart/mixed\b!i)) { # Try to assume UTF-8 because Alpine seems to # do wacky things and set charset=X-UNKNOWN $part->charset_set('UTF-8');