Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle non-latin uris #114

Merged
merged 2 commits into from
Sep 5, 2014
Merged

Conversation

iainbeeston
Copy link
Contributor

Ruby's URI.parse does not accept non-latin characters, and will raise an error on any uri that is not completely in the latin alphabet. This is a problem for example, in japanese uris.

I'm no expert on this, but when I googled around (eg. here) the correct way to handle it seems to be to escape the string before parsing.

I've added tests and updated the format attribute to escape uris before parsing them.

Ruby's URI.parse does not accept non-latin characters, and will raise an
error on any uri that is not completely in the latin alphabet. This is a
problem for example, in japanese uris. I believe that the correct way to
handle this in ruby is to escape the string before parsing it.
@iainbeeston
Copy link
Contributor Author

@hoxworth Could you please take another look at this? Initially the build was failing because ruby 1.9 needed a file encoding comment, but I've fixed that now

@hoxworth
Copy link
Contributor

hoxworth commented Sep 5, 2014

@iainbeeston This looks great, thanks!

hoxworth added a commit that referenced this pull request Sep 5, 2014
@hoxworth hoxworth merged commit 3d76a38 into voxpupuli:master Sep 5, 2014
@hoxworth
Copy link
Contributor

hoxworth commented Sep 5, 2014

Released as part of 2.2.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants