On Thu, 22 Sep 2005 14:30:55 +0200, Edi Weitz edi@agharta.de wrote:
The right way to do it would be to add a second optional argument for the charset to URL-DECODE and make the default value user-configurable on a per-request basis. Does that sound OK? I'll probably add something like this in the next days.
OK, I've done that now - version 0.8.0. Please try it out yourself. I've added some examples to test/test.lisp.
There's code in there for LispWorks, AllegroCL and Unicode-SBCL but I haven't tested with SBCL yet. Likewise, I only tested with the latest Firefox and IE on Windows.
Note that the part about "user-configurable on a per-request basis" is kind of hard becaue URL-DECODE is used when the REQUEST object is created, i.e. before the user's dispatchers and handlers are called. Thus the new function RECOMPUTE-REQUEST-PARAMETERS.
For some more info about HTML forms and character sets see this nice article:
http://ppewww.ph.gla.ac.uk/~flavell/charset/form-i18n.html
ChangeLog:
Version 0.8.0 2005-09-24 Added the ability to cope with different external formats (incorporating suggestions from Will Glozer and Ivan Shvedunov) Raw post data is now always saved (so *SAVE-RAW-POST-DATA-P* is gone)
Download:
http://weitz.de/files/tbnl.tar.gz
Cheers, Edi.