Hi Petr

 

I have used #urlEncoded in the past, with success, to deal with German
umlauts. The secret is to urlEncode just the part containing the diacritics.
If you encode the whole url, the slashes are encoded, and this confuses
Zinc, which segments the url before decoding.

 

So I would expect you to be able to read your file with:

 

ZnEasy get: 'http://domain.com/','ěščýž.html' urlEncoded.

 

However, this also fails with 'ASCII character expected', and I can't
understand why. The debug trace has too many levels for me to understand.
Zinc is evidently getting in a mess trying to decode the urlEncoded string,
but if we try:

 

'ěščýž.html' urlEncoded urlDecoded

 

as a separate operation, it works OK.

 

I think only Sven can explain this for you.

 

HTH

 

Peter Kenny

 

 

From: Pharo-users <pharo-users-boun...@lists.pharo.org> On Behalf Of Petr
Fischer via Pharo-users
Sent: 10 September 2018 10:07
To: pharo-users@lists.pharo.org
Cc: Petr Fischer <petr.fisc...@me.com>
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://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 diacritics is OK. 

 

I tried also this:

 

ZnEasy get: 'http://domain.com/ěščýž.html' urlEncoded.

 

but this cripples the whole URL.

 

Thanks! Petr Fischer

 

Reply via email to