decrypt adding ^M characters at the end of each line
Randy Braun
rbraun at footlocker.com
Tue Aug 2 18:19:33 CEST 2011
Thanks... I'll see if I can get the vendor to add --textmode to their
encryption process.
|------------>
| From: |
|------------>
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|David Shaw <dshaw at jabberwocky.com> |
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| To: |
|------------>
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|Randy Braun <rbraun at footlocker.com> |
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Cc: |
|------------>
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|gnupg-users at gnupg.org |
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Date: |
|------------>
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|08/02/2011 10:43 AM |
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Subject: |
|------------>
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|Re: decrypt adding ^M characters at the end of each line |
>--------------------------------------------------------------------------------------------------------------------------------------------------|
On Aug 2, 2011, at 9:55 AM, Randy Braun 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
This sort of thing can happen when the sender and receiver machines have
different conventions for what ends a line of text. Unix machines use LF,
Windows uses CRLF, etc. GPG has built-in support for handling this
confusion, but you have to tell it that the input file is text.
So, on the *encrypting* side, add "--textmode" to the command, and that
will tell GPG to store things appropriately, and the decrypting side will
recognize this and use the appropriate line endings in the resulting file.
David
More information about the Gnupg-users
mailing list