[drakma-devel] utf-8 question
Ross Jekel
ross at sourcelabs.com
Tue Oct 2 05:44:14 UTC 2007
To the best of my knowledge, the two attached patches should work on all common lisp implementations. Basically I just added an "as-keyword" function to the util.lisp of both chunga and drakma that checks the readtable-case and uses #'string-upcase to convert the string if it is :upcase, otherwise it uses #'string-downcase (since the symbols in your source files are typically typed in all lowercase).
The two places (one in chunga read.lisp and one in drakma request.lisp) that call (intern (string-upcase ..) :keyword) were replaced with the (as-keyword ) form.
I've attached the diff -u output trying to follow your patching rules.
If the attachment doesn't go through, I'll paste the patches in.
Ross
----- Original Message -----
From: "Edi Weitz" <edi at agharta.de>
To: "General interest list for Drakma and Chunga" <drakma-devel at common-lisp.net>
Sent: Sunday, September 30, 2007 11:37:46 AM (GMT-0800) America/Los_Angeles
Subject: Re: [drakma-devel] utf-8 question
On Sun, 30 Sep 2007 10:40:24 -0700 (PDT), Ross Jekel <ross at sourcelabs.com> wrote:
> I'm using Allegro CL in case-sensitive modern mode (the
> default). There are several places in chunga and drakma that might
> do something like (intern (string-upper somevalue) :keyword) making
> uppercase symbols such as :CONTENT-TYPE for headers or :UTF-8 for
> encoding types. If there is any code that compares against the
> lower-case symbol (such as :content-type in get-content-type in
> drakma/read.lisp), the match fails.
Ah, good, thanks for the analysis. I myself have never used "modern
mode" and I don't really care about it, so I won't "fix" this myself,
but if someone is interested in doing it, I'll gladly accept clean
patches, of course.
http://weitz.de/patches.html
Thanks again,
Edi.
_______________________________________________
drakma-devel mailing list
drakma-devel at common-lisp.net
http://common-lisp.net/cgi-bin/mailman/listinfo/drakma-devel
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: drakma.txt
URL: <https://mailman.common-lisp.net/pipermail/drakma-devel/attachments/20071001/5bd8ad1c/attachment.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: chunga.txt
URL: <https://mailman.common-lisp.net/pipermail/drakma-devel/attachments/20071001/5bd8ad1c/attachment-0001.txt>
More information about the Drakma-devel
mailing list