Wed 05 Oct 2005 08:24:08 AM UTC, original submission:
Apple's Mail.app encodes text/html MIME parts with a soft line break at the end of the MIME part:
--Apple-Mail-2--132721608
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
charset=UTF-8
<HTML><BODY style=3D"word-wrap: break-word; -khtml-nbsp-mode: space; =
-khtml-line-break: after-white-space; ">=C2=B4=C3=A9<DIV><BR =
class=3D"khtml-block-placeholder"></DIV><DIV><FONT =
class=3D"Apple-style-span" color=3D"#333333" face=3D"Lucida Grande">=D9=86=
=D8=B4=D9=8A=D8=AE<BR></FONT><DIV><DIV>On Oct 5, 2005, at 12:44 AM, =
Ryan Nielsen wrote:</DIV><BR =
class=3D"Apple-interchange-newline"><BLOCKQUOTE =
type=3D"cite">balbasf<DIV><B>fjdskalf</B></DIV><DIV>jfksdlfjaklsl</DIV><DI=
V><I>fjkdsljfa</I></DIV><DIV><I><B>fduisfopsd</B></I></DIV><DIV>jfkds</DIV=
><DIV><BR =
class=3D"khtml-block-placeholder"></DIV><DIV>--</DIV><DIV>Ryan</DIV></BLOC=
KQUOTE></DIV><BR></DIV></BODY></HTML>=
--Apple-Mail-2--132721608--
qprint.pl doesn't remove this final '=' so it appears in archive files created from text/html quoted-printable messages. This diff makes things better (for me, in my test messages...):
--- /tmp/qprint.pl 2005-10-05 01:23:15.000000000 -0700
+++ /Volumes/Data/local/perl5/qprint.pl 2005-10-05 01:11:28.000000000 -0700
@@ -36,7 +36,7 @@
local($_) = shift;
s/[^\S\r\n]*(\r?\n)/$1/g; # remove trailing whitespace on each line
- s/\=\r?\n//g; # remove soft linebreaks
+ s/\=(\r?\n|$)//g; # remove soft linebreaks
s/=([0-9A-Fa-f]{2})/pack('H2',$1)/ge; # convert hex codes
$_; # return result
}
|