--textmode not retaining the originating EOR

Werner Koch wk at gnupg.org
Fri May 24 17:07:18 CEST 2013


On Fri, 24 May 2013 15:27, ira.kirschner at sungard.com said:
> I am in the midst of changing my RedHat Linux environment from using PGP to
> GPG (1.4.5). When I previously deciphered a client provided ".pgp" file, the
> resultant file was CRLF terminated. No matter what I have tried using gpg to
> decipher the same file, the resultant file is always LF terminated.

That is a property of --textmode.  RFC 4880 section 5.9 says this:

   If it is a 't' (0x74), then it contains text data, and thus may need
   line ends converted to local form, or other text-mode changes.  The
   tag 'u' (0x75) means the same as 't', but also indicates that
   implementation believes that the literal data contains UTF-8 text.
   [...]

     - The remainder of the packet is literal data.

       Text data is stored with <CR><LF> text endings (i.e., network-
       normal line endings).  These should be converted to native line
       endings by the receiving software.

> What should I be doing to create a resultant file in the same manner that
> the client created it?

Use binary mode on the sending site (i.e don't use --textmode).  Or
convert it back to CRLF.


Shalom-Salam,

   Werner

-- 
Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.




More information about the Gnupg-users mailing list