chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] [Q] uri-common has problem with UTF-8 uri.


From: Alex Shinn
Subject: Re: [Chicken-users] [Q] uri-common has problem with UTF-8 uri.
Date: Wed, 16 Jan 2013 11:22:57 +0900

On Wed, Jan 16, 2013 at 12:59 AM, Peter Bex <address@hidden> wrote:
On Wed, Jan 16, 2013 at 12:39:16AM +0900, Alex Shinn wrote:
> The internal representation is either decoded, or it is encoded.
> Either can be made to work.
>
> In this case, the decoded uri-common representation of the former is:
>
>   ((bool-expr . "x&y=1"))
>
> and the decoded representation of the latter is:
>
>   ((bool-expr . "x") (y . "1"))
>
> just as you say, so this is how they are stored in the URI object.
>
> In uri-generic, both get parsed to:
>
>   ((bool-expr . "x&y=1"))

This cannot work because uri-common is re-using uri-generic's parser.
Also, uri-generic doesn't do alist-decoding at all, because form-encoding
is a HTML affair and has nothing to do with HTTP or URI standards.

Ah, OK, there may be implementation details on why you
store encoded or decoded.

Anyway, this isn't really important.  I'm mostly concerned
with making utf8 do the right thing, and was wondering what
the API was because it's not clear from the docs.

Put another way, do uri-path and uri-query return the
encoded or decoded values (maybe differently for uri-common
and uri-generic)?

-- 
Alex


reply via email to

[Prev in Thread] Current Thread [Next in Thread]