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

Andrei Stebakov lispercat at gmail.com
Tue Sep 2 20:51:51 UTC 2008


Thanks, Robert, it works!
The reason I don't use it globally is because in the system I have right now
I pass a lot of textual data in the GET requests and for some reason it
didn't work off the bat when I set that global variable (I'll look into it
anyway).

Andrew

On Tue, Sep 2, 2008 at 4:38 PM, Robert Synnott <rsynnott at gmail.com> wrote:

> 2008/9/2 Andrei Stebakov <lispercat at gmail.com>:
> > No luck emailing the quotation marks. Let's try a German character 'ß'
> >
> > (defun test-handler ()
> >   (no-cache)
> >   (recompute-request-parameters :external-format
> (flex:make-external-format
> > :utf-8 :eol-style :lf))
> >   (setf (hunchentoot:content-type) "text/html; charset=utf-8")
> >   (with-html-output-to-string (*standard-output* nil :prologue nil
> :indent
> > nil)
> >     (:html
> >      (:head
> >       (:title "Test page"))
> >      (:body
> >       (:p "weiß")))))
> >
> > Will produce text like "wei�"
> > If I set the global variable:
> > (setf *hunchentoot-default-external-format* (flex:make-external-format
> > :utf-8 :eol-style :lf))
> > the problem gets fixed.
> >
> > Andrew
> >
>
> As a matter of interest, why do you have a problem using UTF8
> everywhere? Just about everything supports it these days, and the
> lower seven bits look like ASCII?
>
> Anyway, (setf (reply-external-format &optional reply) new-value) with
> the make-external-format thing as 'new-value' should do the trick.
> Rob
>
> _______________________________________________
> 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/20080902/20c9710e/attachment.html>


More information about the Tbnl-devel mailing list