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, 23 Jan 2013 09:20:30 +0100
User-agent: Mutt/1.4.2.3i

On Wed, Jan 23, 2013 at 03:29:01PM +0900, Ivan Raikov wrote:
> Hi Peter,
> 
>    I think uri-generic does not silently mangle input upon receiving UTF-8,
> it just returns #f.

When parsing, yes.  I think this should stay the way it is (see below).
What I was referring to here was the example in my earlier mail when
passing strings with UTF-8 characters to uri-encode-string, and also when
passing them to the make-uri constructor directly.

Look back to the mail, it contains an example of a string that gets
mangled, which is what led Alex to question the correctness of
uri-common/uri-generic's decoding of special characters.

> I think it is not a bad idea to raise an exception instead.

This would be extremely painful for the end-user.  Either a string
matches the BNF grammar in the RFC and it parses, or it doesn't match:
it'll return an uri object or #f.  Handling a third case with the
associated exception-catching machinery will make URI-handling code
needlessly complex.

> I have not yet had the chance to thoroughly test the UTF-8 mapping
> constructor, but will try to do this during the weekend.

Cool!

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



reply via email to

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