decrypt adding ^M characters at the end of each line

David Tomaschik david at systemoverlord.com
Tue Aug 2 17:18:06 CEST 2011


On Tue, Aug 2, 2011 at 9:55 AM, Randy Braun <rbraun at footlocker.com> wrote:
>
> Anyone have any ideas as to why I am seeing ^M characters at the end of
> each line after decrypting a file?
>
> I am using the following:
>
> /sftw/gnupg/bin/gpg --output /path/path/testfile.txt
> --decrypt /path/path/testfile.txt.pgp
>
> This is gnupg 1.4.10 on AIX 5.3.12.2


Was the file encrypted on another platform?  Windows, for example,
places \r\n (carriage return, newline) at the end of each line.  UNIX
OSs use just \n, and Mac OS 9 and earlier used just \r.  ^M is another
representation of the carriage return character.  (Aka \r.)

David



-- 
David Tomaschik, RHCE, LPIC-1
System Administrator/Open Source Advocate
OpenPGP: 0x5DEA789B
http://systemoverlord.com
david at systemoverlord.com



More information about the Gnupg-users mailing list