I assume this question is better placed here .... I am interested in the answer as well. --Hannes ---------- Forwarded message ---------- From: Dennis Schenk <d.schenk@students.unibe.ch> Date: Tue, 22 Jan 2013 14:00:06 +0100 Subject: [Moose-dev] ZnUrl, Encoding To: Moose-related development <moose-dev@iam.unibe.ch> Hi all, I stumpled upon a problem with encoding of URLs in Pharo. I am using the Google Geocoding API. For example I want to get the result of: http://maps.googleapis.com/maps/api/geocode/json?address=Willemstad,+Curaçao&sensor=false&language=en When one enters this in a Browser a correct JSON response is returned. If I do the following: *(Url absoluteFromText: ' http://maps.googleapis.com/maps/api/geocode/json?address=Willemstad,+Curaçao&sensor=false&language=en<http://maps.googleapis.com/maps/api/geocode/json?address=Willemstad,+Cura%C3%A7ao&sensor=false&language=en>') retrieveContents contents.* I get an error back grom Google. When digging through the code I found that in ZnHTTPSocketFacade the following happens: *' http://maps.googleapis.com/maps/api/geocode/json?address=Willemstad,+Curaçao&sensor=false&language=en<http://maps.googleapis.com/maps/api/geocode/json?address=Willemstad,+Cura%C3%A7ao&sensor=false&language=en>' asZnUrl * And the result of this is: http://maps.googleapis.com/maps/api/geocode/json?address=Willemstad,+Cura%C3... * * Which Google does not know how to handle and then returns an error. Does anyone have an idea how I could get contents from a URL which has special chars like '*ç'?* Or is there a way to convert all special chars to to their 'normal' counterparts, like *ç -> c?* * * Cheers, Dennis