^M characters are embedded at the end of every record.

David Shaw dshaw@jabberwocky.com
Wed Nov 6 23:34:01 2002


On Wed, Nov 06, 2002 at 02:23:58PM -0700, Loo, Peter wrote:
> 
> Hi All,
> 

> I created a text file in Windows environment.  Then it is encrypted
> and FTPed to a Unix server where the file is decrypted.  After
> decryption, I am seeing ^M characters at the end of each record.  I
> have tried sending the file in both ASCII and BINARY modes.  Both
> modes don't help.  However, if I send the plain text file via FTP in
> ASCII mode, the file does not contain and control characters.  Is
> there a way to decrypt the file into an output file without ^M
> character or is there a way to encrypt the file without ^M?

The problem is the different line endings on the Windows and Unix
platforms.  The solution is, when encrypting, make sure you tell your
encryption program that the file is text.  If you have GnuPG on the
Windows side, use the --textmode option.  If you have PGP, there is a
checkbox for "input file is text".

Then, when the file is decrypted on the Unix side, the receiving
program knows what to do about the line endings.

David

-- 
   David Shaw  |  dshaw@jabberwocky.com  |  WWW http://www.jabberwocky.com/
+---------------------------------------------------------------------------+
   "There are two major products that come out of Berkeley: LSD and UNIX.
      We don't believe this to be a coincidence." - Jeremy S. Anderson