decrypt adding ^M characters at the end of each line

Randy Braun rbraun at footlocker.com
Tue Aug 2 19:44:47 CEST 2011


OK thanks.... I'm going to try to get the vendor to encrypt in text mode if
not I'll have to strip out the ^M with sed before we process the file.




|------------>
| From:      |
|------------>
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
  |David Shaw <dshaw at jabberwocky.com>                                                                                                                |
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| To:        |
|------------>
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
  |Randy Braun <rbraun at footlocker.com>                                                                                                               |
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Cc:        |
|------------>
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
  |David Tomaschik <david at systemoverlord.com>, gnupg-users at gnupg.org                                                                                 |
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Date:      |
|------------>
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
  |08/02/2011 11:55 AM                                                                                                                               |
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Subject:   |
|------------>
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
  |Re: decrypt adding ^M characters at the end of each line                                                                                          |
  >--------------------------------------------------------------------------------------------------------------------------------------------------|





On Aug 2, 2011, at 12:17 PM, Randy Braun wrote:

> I have that very question out to the vendor to see what platform the file
> was created on prior to encrypting it.
>
> I have seen this same behavior with ftp when you go from windows to unix
or
> vice versa when you don't use binary mode.
>
> I guess I as wondering if there is some sort of switch I can use with pgp
> to strip out the ^M? I know I could cat the output file to sed and strip
> out the ^M but I was hoping there was something in gpg that would do
this.

There is just textmode, which is something the sender sets.  On the
recipient side, GPG follows the encoding inside the message.  If that
message is not textmode (i.e. no transformation) then GPG won't touch the
content, so you need to break out the sed.

David









More information about the Gnupg-users mailing list