From: Andreas Yankopolus
Subject: Problems capturing extended character output
Date: 
Message-ID: <lbadnYEEhcMhnXPZnZ2dnUVZ_tmdnZ2d@speakeasy.net>
I'm working on a program that calls exiftool, a command-line script, to 
pull metadata from image files. I'm using SBCL 0.9.15 installed via Fink 
on OS X and running Emacs in Apple's X11 environment.

The metadata text contains extended characters that I believe are UTF-8; 
I launch my xterms with -en utf-8 and everything displays fine when I 
run exiftool from the command line. The code calling exiftool looks like:

(let ((output (with-output-to-string (stream
                           (sb-ext:run-program "exiftool"
			     (list filename)
                              :output stream)))

Unfortunately, the text I get back in output looks nothing like what I'd 
expect when printed to the screen. I've tried specifying an 
:external-format with format and using various combinations of 
sb-ext:octets-to-string and sb-ext:string-to-octets on output. I also 
tried a different settings of :element-type for with-output-to-string.

Any suggestions would be much appreciated.

Cheers,

Andreas

From: Paolo Amoroso
Subject: Re: Problems capturing extended character output
Date: 
Message-ID: <87irkhucvq.fsf@plato.moon.paoloamoroso.it>
Andreas Yankopolus <·······@xxx.yank.to> writes:

> I'm working on a program that calls exiftool, a command-line script,
> to pull metadata from image files. I'm using SBCL 0.9.15 installed via

If you don't rely on specific features of exiftool, you may access
EXIF data from Lisp:

  ZPB-EXIF - access to digital image Exif data for Common Lisp
  http://www.xach.com/lisp/zpb-exif/


Paolo
-- 
Why Lisp? http://wiki.alu.org/RtL%20Highlight%20Film
The Common Lisp Directory: http://www.cl-user.net
From: Andreas Yankopolus
Subject: Re: Problems capturing extended character output
Date: 
Message-ID: <EsadnR0F-46BmnPZnZ2dnUVZ_r2dnZ2d@speakeasy.net>
Paolo,

> If you don't rely on specific features of exiftool, you may access
> EXIF data from Lisp:
> 
>   ZPB-EXIF - access to digital image Exif data for Common Lisp
>   http://www.xach.com/lisp/zpb-exif/

Thanks for the suggestion. I'm grabbing the XMP information from the 
image file, which includes IPTC-specified fields for an image 
description and the like. The EXIF data gets included as a subset of this.

Cheers,

Andreas
From: Zach Beane
Subject: Re: Problems capturing extended character output
Date: 
Message-ID: <m38xldhguv.fsf@unnamed.xach.com>
Andreas Yankopolus <·······@xxx.yank.to> writes:

> Paolo,
> 
> > If you don't rely on specific features of exiftool, you may access
> > EXIF data from Lisp:
> >   ZPB-EXIF - access to digital image Exif data for Common Lisp
> >   http://www.xach.com/lisp/zpb-exif/
> 
> Thanks for the suggestion. I'm grabbing the XMP information from the
> image file, which includes IPTC-specified fields for an image
> description and the like. The EXIF data gets included as a subset of
> this.

What, specifically? I'd be interested in extending zpb-exif to handle
it.

Zach
From: Andreas Yankopolus
Subject: Re: Problems capturing extended character output
Date: 
Message-ID: <-dCdnaYI4YNNp3PZnZ2dnUVZ_oSdnZ2d@speakeasy.net>
Zach,

> What, specifically? I'd be interested in extending zpb-exif to handle
> it.

I use the IPTC core schema for XMP (http://www.iptc.org/IPTC4XMP/) to 
enter a description, headline, subject codes, location, contact info, 
and a few other things. I'm currently only grabbing the description and 
headline to create the web pages, but have a few plans regarding use of 
the other fields to create galleries associated with locations, 
keywords, etc. I'm also using the camera make, model, and lens in 
creating the pages.

Are you familiar with XMP and/or IPTC? XMP is an XML-based system. I'd 
be happy to send you sample images.

Cheers,

Andreas
From: Andreas Yankopolus
Subject: Re: Problems capturing extended character output
Date: 
Message-ID: <zeqdnRuhY6IwunLZnZ2dnUVZ_t2dnZ2d@speakeasy.net>
Andreas Yankopolus wrote:
> I'm working on a program that calls exiftool, a command-line script, to 
> pull metadata from image files. I'm using SBCL 0.9.15 installed via Fink 
> on OS X and running Emacs in Apple's X11 environment.

I've also tried Carbon Emacs (v 22.0.50.1) and the Fink version of Emacs 
(v 21.2.1) in a terminal window. Both produce the same character errors 
   that I see in X11. The output when I run exiftool from the command 
line is correct in both a terminal window and an xterm.

Cheers,

Andreas