Re: [Pharo-users] ZnURL and parsing URL with diacritics

2019-03-26 Thread PBKResearch
the way. Peter -Original Message- From: Pharo-users On Behalf Of Sven Van Caekenberghe Sent: 26 March 2019 15:08 To: Any question about pharo is welcome Subject: Re: [Pharo-users] ZnURL and parsing URL with diacritics Peter, It *is* a bogus URL, please go and read some RFCs. A

Re: [Pharo-users] ZnURL and parsing URL with diacritics

2019-03-26 Thread Sven Van Caekenberghe
cters >> commonly found in a url" >> >> ^ ZnPercentEncoder new safeSet: ':/?#%', (ZnPercentEncoder >> rfc3986UnreservedCharacters); >> encode: self >> >> This works in much the same way as the snippet I posted originally, because &

Re: [Pharo-users] ZnURL and parsing URL with diacritics

2019-03-26 Thread PBKResearch
ntEncoder>>encode:. > > I seem to be trying to monopolize this thread, so I shall shut up now. > > HTH > > Peter Kenny > > -Original Message- > From: Pharo-users On Behalf Of > PBKResearch > Sent: 24 March 2019 15:36 > To: 'Any ques

Re: [Pharo-users] ZnURL and parsing URL with diacritics

2019-03-26 Thread Sven Van Caekenberghe
;encode:. > > I seem to be trying to monopolize this thread, so I shall shut up now. > > HTH > > Peter Kenny > > -Original Message- > From: Pharo-users On Behalf Of > PBKResearch > Sent: 24 March 2019 15:36 > To: 'Any question about pharo is welcome

Re: [Pharo-users] ZnURL and parsing URL with diacritics

2019-03-26 Thread PBKResearch
my code simply reproduces the essentials of ZnPercentEncoder>>encode:. I seem to be trying to monopolize this thread, so I shall shut up now. HTH Peter Kenny -Original Message- From: Pharo-users On Behalf Of PBKResearch Sent: 24 March 2019 15:36 To: 'Any question about p

Re: [Pharo-users] ZnURL and parsing URL with diacritics

2019-03-24 Thread PBKResearch
url asString do: [ :ch|(':/?%' includes: ch ) -Original Message- From: Pharo-users On Behalf Of PBKResearch Sent: 24 March 2019 12:11 To: 'Any question about pharo is welcome' Subject: Re: [Pharo-users] ZnURL and parsing URL with diacritics Sean, Sven Thinking a

Re: [Pharo-users] ZnURL and parsing URL with diacritics

2019-03-24 Thread PBKResearch
te legal. Should the comment be changed, or the method? -Original Message- From: Pharo-users On Behalf Of Sven Van Caekenberghe Sent: 23 March 2019 20:03 To: Any question about pharo is welcome Subject: Re: [Pharo-users] ZnURL and parsing URL with diacritics > On 23 Mar 2019, at 20:53, Sean

Re: [Pharo-users] ZnURL and parsing URL with diacritics

2019-03-23 Thread Sven Van Caekenberghe
> On 23 Mar 2019, at 20:53, Sean P. DeNigris 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'

Re: [Pharo-users] ZnURL and parsing URL with diacritics

2019-03-23 Thread Sean P. DeNigris
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 > Inciden

Re: [Pharo-users] ZnURL and parsing URL with diacritics

2019-03-23 Thread PBKResearch
m: Pharo-users On Behalf Of Sean P. DeNigris Sent: 23 March 2019 04:00 To: pharo-users@lists.pharo.org Subject: Re: [Pharo-users] ZnURL and parsing URL with diacritics Pharo Smalltalk Users mailing list wrote > OK. Thanks for examples. But in my case, the bad URL (with diacritics) > comes di

Re: [Pharo-users] ZnURL and parsing URL with diacritics

2019-03-22 Thread Sean P. DeNigris
Pharo Smalltalk Users mailing list wrote > OK. Thanks for examples. But in my case, the bad URL (with diacritics) > comes directly from the Zomato.com REST API (they probably do not read > specs), so I'll end up with a few "hacks" with strings. Sven actually found a trick to handle this case and t

Re: [Pharo-users] ZnURL and parsing URL with diacritics

2018-09-11 Thread Erik Stel
Check out the following info: https://en.wikipedia.org/wiki/Internationalized_Resource_Identifier The REST API might be answering an IRI instead of an URI in which case it might not be faulty after all (I did not check th

Re: [Pharo-users] ZnURL and parsing URL with diacritics

2018-09-10 Thread Sven Van Caekenberghe
s://en.wikipedia.org/wiki/' , 'Česká republika' urlEncoded) asUrl retrieveContents. > On 10 Sep 2018, at 14:16, Petr Fischer via Pharo-users > wrote: > > > From: Petr Fischer > Subject: Re: [Pharo-users] ZnURL and parsing URL with diacritics > Date: 10 Septe

Re: [Pharo-users] ZnURL and parsing URL with diacritics

2018-09-10 Thread Petr Fischer via Pharo-users
e do the following. > > 'https://en.wikipedia.org/wiki' asUrl addPathSegment: 'Česká republika'; > yourself. > > Or something like > > ZnClient new > url: 'https://en.wikipedia.org/wiki'; > addPathSegment: 'Česká republika&#

Re: [Pharo-users] ZnURL and parsing URL with diacritics

2018-09-10 Thread Sven Van Caekenberghe
Ls, I would maybe do the following. 'https://en.wikipedia.org/wiki' asUrl addPathSegment: 'Česká republika'; yourself. Or something like ZnClient new url: 'https://en.wikipedia.org/wiki'; addPathSegment: 'Česká republika'; get. HTH, Sven > HTH

Re: [Pharo-users] ZnURL and parsing URL with diacritics

2018-09-10 Thread PBKResearch
Pharo-users Sent: 10 September 2018 10:07 To: pharo-users@lists.pharo.org Cc: Petr Fischer Subject: [Pharo-users] ZnURL and parsing URL with diacritics Hello, when I try to parse this URL asUrl, error "ZnCharacterEncodingError: ASCII character expected" occurs: 'http

[Pharo-users] ZnURL and parsing URL with diacritics

2018-09-10 Thread Petr Fischer via Pharo-users
--- Begin Message --- Hello, when I try to parse this URL asUrl, error "ZnCharacterEncodingError: ASCII character expected" occurs: 'http://domain.com/ěščýž.html' asUrl. this also does not work: ZnEasy get: 'http://domain.com/ěščýž.html' How to solve this? In the web browser, URL with diacri