Photo UIDs on --attribute-fd on Windows and strange LF->CRLF conversions

Michael Schierl schierlm at gmx.de
Thu Aug 4 13:18:14 CEST 2005


Adam Schreiber schrieb:

> I've been working on Photo ID support for seahorse.  We decided to
> attack the problem by using a helper program to output a jpg to a known
> location.  Since gpg uses xloadimage on UNIX systems to display the
> photo ids, we created a program that dumps the intended output for
> xloadimage to a file specified by an environment variable.  

Thanks for your answer. I thought of this approach already, but that
would break platform independence as well (since i had to compile that
utility for each platform) or it would take ages (because starting a new
java vm for each image is simply slow...).

So this would be my last resort :)

But I think I have a solution (at least a hack that is dirty enough so
that I cannot think of any cases it does not handle): since there are
always at least two text lines before the first attribute packet
("pub:..." and "[GNUPG:] ATTRIBUTE ..."), I'd just write a "filter
stream" that looks at the first line ending. if it is exactly CRLF, do
CRLF->LF conversion, if it is LF or CR only, do nothing.

Michael



More information about the Gnupg-devel mailing list