[drakma-devel] drakma vs. http://popurls.com

Edi Weitz edi at agharta.de
Mon Jan 29 23:40:01 UTC 2007


On Mon, 29 Jan 2007 15:23:58 -0800, Chris Dean <ctdean at sokitomi.com> wrote:

> I have what will probably end up being an obvious and foolish
> question.

No, that's not a foolish question.  It's just that the website you're
trying to visit has errors - see below.

> When I run (http-request "http://popurls.com/") I get an error from
> flexi-streams that says:
>
>   Unexpected value #x20 in UTF-8 sequence.
>      [Condition of type FLEXI-STREAM-ENCODING-ERROR]
>
> What's going on?  Do I need to set external-format-in ?

According to

  http://validator.w3.org/check?uri=http%3A%2F%2Fpopurls.com%2F

the website claims to be encoded as UTF-8 but contains octet sequences
that are illegal in UTF-8.  And that's why you get errors - Drakma
looks at the headers sent by the server, believes what the server
says, and tries to decode the body accordingly.  You can work around
this by using the FORCE-BINARY keyword argument, but then you end up
with a bunch of octets...

You should probably ask the operators of popurls.com to fix their
site.

Cheers,
Edi.



More information about the Drakma-devel mailing list