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

Loo, Peter Peter.Loo@bannerhealth.com
Wed Nov 6 23:39:02 2002


Thank Julian.  I tried using McAfee's PGP software to encrypt the file =
and was decrypted on the Unix server without any control characters.  I =
thought there might be a flag that I was overlooking in GPG.  I was =
hoping to avoid using Unix utilities to strip the control characters.  =
To accomplish this using McAfee's PGP is:

pgp --encrypt --user 0xDA17BB2F --text --armor --output BHS.txt.pgp =
BHS.txt

How would I issue the --text and --armor flags in GPG?

Thanks.

Peter

-----Original Message-----
From: Julian T J Midgley [mailto:jtjm@xenoclast.org]
Sent: Wednesday, November 06, 2002 2:50 PM
To: Loo, Peter
Cc: gnupg-users@gnupg.org
Subject: Re: ^M characters are embedded at the end of every record.


On Wed, 6 Nov 2002, 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?

This is nothing to do with GPG; Windows (and DOS systems generally) use
CRLF to mark end of line, whereas Unix system uses LF only.  The ^M
characters you see on the Unix machine are the 'spare' CR characters =
that
Windows introduces.

FTP's ascii mode deals with the translation from one format to the other
automatically, but clearly can't do this for an encrypted file.  The
easiest thing to do is to strip the spurious carriage-returns on the =
Unix
machine post-decryption. ( tr -d '\r' < file > cleanfile )

qv: http://galaxy.ps.uci.edu/users/esirko/howto/crlf.html

Julian

--=20
Julian T. J. Midgley                       http://www.xenoclast.org/
Cambridge, England.
PGP: BCC7863F FP: 52D9 1750 5721 7E58 C9E1  A7D5 3027 2F2E BCC7 863F