[elephant-devel] Re: new elephant and unicode troubles
Ties Stuij
cjstuij at gmail.com
Sun Feb 25 09:50:49 UTC 2007
ok, i've slept a bit and all of a sudden the problem isn't that
difficult. That is to say, i understand and can solve the problem, but
there seem to be 'slightly' deeper problems.
Basically elephant checks the first character of a string for being
over x7f, if it's not, the string is encoded as utf-8. In
serialize-to-utf-8 no character can be over charcode x7f or the
function will fail silently, however in utf-8 the majority of the
characters are over x7f, since it covers a range of four bytes.
ah, shoots, henrik beat me to it.
well is there something wrong with just checking what string the
underlying lisp provides and dispatch on that, kinda like the old
serialize function did in 6.0?
greets,
Ties
On 2/25/07, Ties Stuij <cjstuij at gmail.com> wrote:
> with the cvs elephant on sbcl on linux with bdb, with all tests
> passed, the following code:
>
> (defclass crocodile ()
> ((belly :accessor belly-of :initform "järv"))
> (:metaclass persistent-metaclass))
>
> (defparameter *ben* (make-instance 'crocodile))
>
> (belly-of *ben*)
>
> gives:
>
> deserialize of object tagged with 188 failed
>
> as an error, which comes from %deserialize, from deserialize in
> serialize2.lisp. A string with 'safe' characters though is properly
> recognized as utf-8. The 188 can also be 132 or another value. The 6.1
> checkout renders the same result but i must say i did like the error
> message 'deserialize fubar!' more. Ideas?
>
> Greets,
> Ties
>
More information about the elephant-devel
mailing list