I recall seeing this trick when Sven published it, but I have never tried it. Trying it now, I get strange results. I entered: 'https://fr.wiktionary.org/wiki/péripétie' asFileReference asUrl. And when I inspect the result, it is the address of a non-existent file in my image directory. I am using Moose 6.1 ( Pharo 6.0 Latest update: #60541) on Windows 10. This is not a current image, I know, but it is more recent than the date of Sven's post (Dec 2014). Has something changed since 2014? 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'. This works fine, and is neater than the alternative with explicit percent encoding which I currently use. So thanks Sean for pointing me to the thread. Peter Kenny -----Original Message----- From: Pharo-users <pharo-users-bounces@lists.pharo.org> 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 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 then forgot he he [1]. Just in case you still have the issue: 'http://myhost/path/with/umlaut/äöü.txt' asFileReference asUrl. 1. http://forum.world.st/Umlauts-in-ZnUrl-tp4793736.html ----- Cheers, Sean -- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html