asjo@koldfront.dk (Adam Sjøgren) writes: > On Wed, 26 Dec 2012 01:33:33 +0100, Adam wrote: > >> So, I'm kind of stuck on that. > > Skipping the first 16 bytes and using a non-multibyte buffer on the way > makes it work with --attribute-fd: > > (defun epg-key-image (key-id) > "Return the image of a key, if any" > (with-temp-buffer > (set-buffer-multibyte nil) > (let* ((coding-system-for-write 'binary) > (coding-system-for-read 'binary) > (data (shell-command-to-string (concat epg-gpg-program > " --attribute-fd 2" > " --list-keys " key-id " >/dev/null")))) > (when (> (length data) 0) > (insert (substring data 16)) > (create-image (buffer-string) nil t))))) Nice feature that I had to try immediately :-) For some reason it just did not work with my signature - i guess the ø in Jørgensen is to blame. Adding a "--display-charset utf-8" as parameter to gpg solved it. Patch attached and this posting signed as example. Kind regards, Arne