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: Peter Bex
Subject: Re: [Chicken-users] [Q] uri-common has problem with UTF-8 uri.
Date: Wed, 16 Jan 2013 09:21:37 +0100
User-agent: Mutt/1.4.2.3i

On Wed, Jan 16, 2013 at 11:22:57AM +0900, Alex Shinn wrote:
> 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.

OK, I think it's worth figuring this out.

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

The decoded values.  In the case of uri-generic they're only
partially decoded (reserved chars stay encoded).

Example:

(use uri-generic)
(uri-path (uri-reference "%66%6F%6F")) => "foo"
(uri-path (uri-reference "%20")) => "%20"

(use uri-common)
(uri-path (uri-reference "%66%6F%6F")) => "foo"
(uri-path (uri-reference "%20")) => " "

Cheers,
Peter
-- 
http://sjamaan.ath.cx



reply via email to

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