[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-mailutils] Re: mailutils bug? quoted-printable encoder..

From: Simon Josefsson
Subject: [bug-mailutils] Re: mailutils bug? quoted-printable encoder..
Date: Sun, 05 Sep 2004 12:01:40 +0200
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3 (gnu/linux)

Richard Dawe <address@hidden> writes:

> Hello.
> Shashank Kavishwar wrote:
>> I have a PDF attachment that came through an email in
>> quoted-printable encoding. I decode the attachment using the
>> mailutils API and can view it properly. But, if after decoding the
>> attachment file, I encode it again in quoted-printable and then
>> forward it to myself, the PDF file becomes corrupted. Is there a
>> problem with the quoted-printable encoder?
>>  I am using mailutils-0.4.
> PDFs are binary files. QP is not good enough for encoding PDFs. Consider 
> what happens to the line-endings. If you send from a Unix system to a 
> Windows system, the line endings will get converted from LF to CRLF, 
> which corrupts the PDF.

Then something is broken.  Encoding of CR and LF in binary data should
be done with =0D and =0A, not using hard line breaks.

> There's a bug in older versions of Exchange which means that it encodes 
> PDFs using QP. I think there's a work-around in MS's Knowledge Base.
> Send PDFs as Base64.

I agree with your conclusion, though.  Sending PDF as QP doesn't work
well in practice.  Many QP encoders handle CR/LF incorrectly.  Base64
should be used instead.  But the reason is due to software bugs, not
an inherent limitation of QP.  Just thought I'd point that out.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]