> On 23 Mar 2019, at 20:53, Sean P. DeNigris <s...@clipperadams.com> wrote:
> 
> Peter Kenny wrote
>> And when I inspect the result, it is the address of a non-existent file in
>> my image directory.
> 
> Ah, no. I see the same result. By "worked" I meant that it created a URL
> that safari accepted, but I see now it's not the same as correctly parsing
> it.
> 
> 
> Peter Kenny wrote
>> Incidentally, I tried the other trick Sven cites in the same thread. The
>> same url as above can be written:
>> 'https://fr.wiktionary.org/wiki' asUrl / 'péripétie'.
> 
> Yes, this works if you are assembling the URL, but several people presented
> the use case of processing URLs from elsewhere, leaving one in a
> chicken-and-egg situation where one can't parse due to the diacritics and
> can't escape the diacritics (i.e. without incorrectly escaping other things)
> without parsing :/

Yes, that is pretty close to a catch 22. Strictly speaking, such URLs are 
incorrect and can't be parsed.

I do understand that sometimes these URLs occur in the wild, but again, 
strictly speaking they are in error.

The fact that browser search boxes accept them is a service on top of the 
strict URL syntax, I am not 100% sure how they do it, but it probably involves 
a lot of heuristics and trial and error.

The parser of ZnUrl is just 3 to 4 methods. There is nothing preventing 
somebody from making a new ZnLoseUrlParser, but it won't be easy.

> -----
> Cheers,
> Sean
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
> 


Reply via email to