Skip to content

url_escape not working well for umlaut characters #28

@HoneyryderChuck

Description

@HoneyryderChuck

Greetings,

I'm having an issue with the gem concerning the escaping of the characters before the api call to google or yahoo is made. Let's say, I have the following address: "Hardturmstrasse 253 Zürich". When the parameters are escaped in order to be inserted in the api call (geocoder.rb, line 594), they are apparently wrongly escaped. So, the call in the same line to Geokit::Inflector::url_escape("Hardturmstrasse 253 Zürich") produces the following result: "Hardturmstrasse+253+Z%C3rich". Well, the api call returns no results for such an address. The specific problem here is how the "ü" character is being escaped. Escaping then "Zürich" with the URI.escape function, I get the following encoding for it: "Z%C3%BCrich". I use it in the api call, and... it works. Do you have any idea why the escaping is going wrong in such cases?

Regards,
Tiago

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions