[Bese-devel] UCW and Unicode

Marco Baringer mb at bese.it
Wed Nov 9 15:46:51 UTC 2005


Jan Rychter <jan at rychter.com> writes:

> I can't think of anything reasonable -- myself, I'd remove the content
> logging and add it as required, when I actually debug something. It
> isn't useful to someone who doesn't know UCW internals anyway.

fair enough.

> I'm desperate enough to actually dive into this, but I feel I'm missing
> something fundamental about CL -- namely, how to treat byte-data in
> memory (say, in a vector) as a utf-8 character stream. I can't find a
> way, and yet there should be one.

if you're on sbcl there's sb-ext:octets-to-string and
sb-ext:string-to-octets, both of which take an external-format
parameter. once you have a vector of bytes converting it to a string
(in memory) should (not that i've tried) be as simple as calling one
of these functions.

if you're already writing the data out to a file it should (again, not
that i've tried) be easy to close the file and reopen it with a
different element-type.

-- 
-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