[hunchentoot-devel] Re: utf-8 encoding problems

Andrei Stebakov lispercat at gmail.com
Wed Sep 3 16:05:03 UTC 2008


Does it mean that I need to get the underlying binary stream from the flexi
stream returned by (send-headers) and use it with write-jpeg-to-stream?
Or use some other function (not write-jpeg-to-stream) so it returns an array
of octets instead of writing to the stream?

Andrew

On Wed, Sep 3, 2008 at 10:34 AM, Edi Weitz <edi at agharta.de> wrote:

> On Wed, 3 Sep 2008 10:10:32 -0400, "Andrei Stebakov" <lispercat at gmail.com>
> wrote:
>
> > My image handlers look approximately like:
> >
> > (defun image-handler ()
> >   (no-cache)
> >   (setf (hunchentoot:content-type) "image/jpeg")
> >   (let ((stream (send-headers)))
> >     (with-image (new 100 100)
> >        (do-something-with-img new)
> >        (write-jpeg-to-stream stream :image new))))
>
> You want to write binary data to this stream.  See the sentence about
> "faithful output" here:
>
>  http://weitz.de/cl-gd/#write-jpeg-to-stream
>
> Edi.
> _______________________________________________
> tbnl-devel site list
> tbnl-devel at common-lisp.net
> http://common-lisp.net/mailman/listinfo/tbnl-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/tbnl-devel/attachments/20080903/b9508ca9/attachment.html>


More information about the Tbnl-devel mailing list