Andreas Yankopolus <andreas@...> writes:
> Thanks for the quick reply. This was similar to one of my stabs at
> solving the problem (I also added an :external-format key prior to
> the :utf-8) and results in an error I'm starting to see frequently:
Sorry, that (missing :external-format) was my bad.
> Illegal :UTF-8 character starting at byte position 622.
> [Condition of type SB-IMPL::INVALID-UTF8-STARTER-BYTE]
> The bizarre part is that Adobe XMP information is supposed to be
> UTF-8 encoded. The file I'm trying to read also contains the tag:
> <?xml version="1.0" encoding="UTF-8"?>
> Is it possible that the data isn't coming back from run-program in
No, not the way you are doing it.
However, perhaps this is the way forward:
(with-open-file (f "/tmp/exif.data" :direction :output :element-type '(unsigned-byte 8))
(run-program ... :output f))
1. Confirm that the file contains the same data you see in xterm when running
exiftool from the terminal. If so, then
2a. Read it in as :UTF-8. If it breaks, then the output isn't UTF-8 really, but
magic binary soup, in which case you need to figure out which parts are UTF-8.
2b. If the file looks different, then exif probably notices that it isn't talking
to a terminal and alters its output format somehow.
-- Nikodemus Schemer: "Buddha is small, clean, and serious."
Lispnik: "Buddha is big, has hairy armpits, and laughs."