Photo UIDs on --attribute-fd on Windows and strange LF->CRLF
patrick at mozilla-enigmail.org
Wed Aug 3 22:16:07 CEST 2005
-----BEGIN PGP SIGNED MESSAGE-----
Michael Schierl wrote:
> (sorry for the private mail, David. I guess I have to read more mailing
> lists to remember clicking the "reply to all" button...)
> David Shaw schrieb:
>>>The problem here is twofold - first, you can't dump jpegs that way.
>>>You'll end up with garbage because it'll be mixed up with the key
>>>listings themselves. The second problem is related to the first -
>>>you're dumping to stdout, and stdout on windows does textmode
>>>conversion by default.
> Hmm. For that "I can't do it that way" it works surprisingly well :)
> In all my tests it worked to read in "line-mode" and whenever there was an
> [GNUPG:] ATTRIBUTE ...
> line, switch to "byte-mode" and read that many bytes. Then check for
> CR-LFs, compensate by reading a few more bytes, and go on reading in
> "line-mode". That one worked well except in the case where the jpg ended
> with a LF byte.
> FWIW: I have that idea of "overloading stdout" from enigmail, which does
> it exactly that way (if the output in the debugging console is not "faked").
The console is not "faked" but it doesn't care for CRLF conversion. If
you look into the code of Enigmail, you'll notice that it actually does
CRLF conversion on Windows systems to compensate the GnuPG/Windows
output. But note that this is really a Windows-only issue (and probably
GnuPG compiled with MinGW only?), so if you want to be platform
independent you'll need to know the platform.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
More information about the Gnupg-devel