On 06 Sep 2011, at 08:51, Philippe Marschall wrote:

> On 09/05/2011 10:04 PM, Sven Van Caekenberghe wrote:
>> 
>> On 05 Sep 2011, at 21:14, Philippe Marschall wrote:
>> 
>>> So… is that URL already percent encoded? If it isn't how do I specify
>>> what encoding should be used? ;-)
>> 
>> Url strings are fed to the ZnUrl parser.
> 
> Does that mean they are expected to be percent encoded?

In the case of #url: yes, with the 'construction' API, no:

ZnNeoClient new
        url: 'http://www.example.com/Foo%20Bar/test.txt'

is equivalent to

ZnNeoClient new
        http;
        host: 'www.example.com';
        addPath: 'Foo Bar';
        addPath: 'test.txt'

The idea is that the 'construction' API does the encoding for you.

>> Ultimately percent encoding is resolved by String>>#unescapePercents which 
>> falls back to UTF-8.
>> Currently, there is no option to specify another encoding.
>> 
>> How/where would this be needed or useful ?
> 
> When you want to use non-ASCII URLs and the server does not support
> UTF-8, eg. VAST.
> 
> I'm mostly concerned that the contract of the method is well specified,
> not necessarily that every edge case is supported.

OK, this might be a possible extension, one day.

Sven

Reply via email to