[Bese-devel] Re: utf-8 encoding problem

Marco Baringer mb at bese.it
Tue May 30 10:52:09 UTC 2006


hbabcockos1 at mac.com writes:

> I don't get what I expect (which is a character in chinese). If I
> save the page in my browser and use more to read it, it looks like
> the 3 characters in my-string have become 6 characters. This worked
> in my 1.5 month old version of UCW, so maybe something changed since
> then? Do I need to specify the encoding anywhere besides in
> component/:content-type?

we've recently tried to make utf-8 output easier, or so we thought...

inside yaclml you should use (<:p #\MY-CHINESE-CHARACTER), this will
put the character onto the response's html-stream, which is a
character stream. the response has an external-format slot which
should be a keyword specifying some encoding, :utf-8 in your case (or
something else if the underlyinglisp supports it). whan the response
is written out to the client as a _binary_ stream we use the lisp's
character-encoding facilities to convert it to the proper sequence of
bytes. the encoding can also be set per-application with the charset
slot on standard-application (sorry for the confusing names), or
through (setf (external-format-for :http) :utf-8). this encoding stuff
is rather new-ish (though it is used and sholud work), if you run into
an issues please inform me.

-- 
-Marco
Ring the bells that still can ring.
Forget the perfect offering.
There is a crack in everything.
That's how the light gets in.
	-Leonard Cohen




More information about the bese-devel mailing list