Hi!
It sometimes necessary to recover from flexi-stream-encoding-error.
For example, it's inconvenient now to use drakma for sites with broken utf encoding (like this livejournal page http://hzweiblum.livejournal.com/)
I can see this page in my browser (with ? instead of badly encoded chars), but (http-request "http://hzweiblum.livejournal.com/") fails signaling flexi-stream-encoding-error.
It will be good to have possibility to supply a character that will be used as a substitution for invalid byte sequence.
use-value restart is added to the get-char-code function in the attached patch.
Regards, -Anton
On Tue, 14 Nov 2006 20:34:07 +0200, "Anton Vodonosov" vodonosov@mail.ru wrote:
It sometimes necessary to recover from flexi-stream-encoding-error.
For example, it's inconvenient now to use drakma for sites with broken utf encoding (like this livejournal page http://hzweiblum.livejournal.com/)
I can see this page in my browser (with ? instead of badly encoded chars), but (http-request "http://hzweiblum.livejournal.com/") fails signaling flexi-stream-encoding-error.
Hmm, works for me.
It will be good to have possibility to supply a character that will be used as a substitution for invalid byte sequence.
use-value restart is added to the get-char-code function in the attached patch.
I've added your code to the new release. See also the new special variable *SUBSTITUTION-CHAR*.
Thanks, Edi.
I can see this page in my browser (with ? instead of badly encoded chars), but (http-request "http://hzweiblum.livejournal.com/") fails signaling flexi-stream-encoding-error.
Hmm, works for me.
Yes, I've muddled they up. This signals a flexi-stream-encoding-error: (http-request "http://www.livejournal.com/interests.bml?int=tao&page=9")
Tried new version, all works fine.
Thanks, -Anton
flexi-streams-devel@common-lisp.net