Attachemnt Decoding

Giganews Newsgroups
Subject: Attachemnt Decoding
Posted by:  Alan Barnett (somebo…
Date: Tue, 11 Apr 2006

I am experiencing a decode issue when attempting to save a csv attachment
from an email using Indy 10, Delphi 6 and calling the SaveToFile() method of
a TIdAttachment object.

If the email is 'Content-Transfer-Encoding: 7bit' the attachement is saved

If the email is 'Content-Transfer-Encoding: quoted-printable' the
attachement is saved but there appears to be file corruption under the
following circumstances :

The format of the 'quoted-printable' attachment seems to divide lines into
pre-defined character length chunks using an '=' character as a continuation
character, e.g. :


The issue I am experiencing is that if the character immediately following
the continuation chacter is a '.' then an additional '.' character is
inserted into the saved file at that position. In the above example this
results in the following line being saved to file where 3.6 becomes 3..6 :


Is there a way to prevent this from happening?

Any comments gratefully received,

Al B