[trivial-utf-8-devel] error on sbcl

Anton Vodonosov avodonosov at yandex.ru
Mon Jul 14 14:47:36 UTC 2008


Hello Marijn.

It works, thank you very much.

-Anton

on Monday, July 14, 2008, 5:15:10 PM Marijn wrote:

> Anyway, I've updated the library, if you re-download it your first
> example should work. (Hm, maybe I should start doing versions.)

> Best,
> Marijn

> On Mon, Jul 14, 2008 at 3:47 PM, Marijn Haverbeke <marijnh at gmail.com> wrote:
>> Hi Anton,
>>
>> The problem seems to be that I'm using too high an optimisation
>> setting, which causes SBCL to go ahead and assume you are passing in a
>> vector of unsigned bytes, while you are not.
>> (trivial-utf-8:utf-8-bytes-to-string (coerce *body* '(unsigned-byte
>> 8))) does work as it should. I'll see if I can make it check the type
>> of its argument.
>>
>> Best,
>> Marijn
>>
>> On Mon, Jul 14, 2008 at 3:41 PM, Anton Vodonosov <avodonosov at yandex.ru> wrote:
>>> Hello.
>>>
>>> The following code when used with SBCL signals an error:
>>>
>>>  (defparameter *body*
>>>    #(110 115 58 104 116 116 112 58 47 47
>>>      115 112 101 99 115 46 111 112 101 110
>>>      105 100 46 110 101 116 47 97 117 116
>>>      104 47 50 46 48))
>>>
>>>  (trivial-utf-8:utf-8-bytes-to-string *body*)
>>>
>>> Invalid byte at start of character: 0xB8
>>>   [Condition of type UTF-8-DECODING-ERROR]
>>>
>>> Backtrace:
>>>  0: (TRIVIAL-UTF-8::UTF-8-STRING-LENGTH #<unavailable argument>)
>>>  1: (UTF-8-BYTES-TO-STRING #<unavailable argument>)
>>>  ...
>>>
>>> With CLISP all is ok, the string is decoded as
>>> ns:http://specs.openid.net/auth/2.0
>>>
>>> Best regards,
>>> -Anton
>>>
>>> _______________________________________________
>>> trivial-utf-8-devel mailing list
>>> trivial-utf-8-devel at common-lisp.net
>>> http://common-lisp.net/cgi-bin/mailman/listinfo/trivial-utf-8-devel
>>>
>>





More information about the trivial-utf-8-devel mailing list