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

changed encoding to fix XML parsing issues #69

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

klinskyc
Copy link

ISO encoding led to XML parsing issues for artists with non english character names (e.g Jhené Aiko). Switching encoding to UTF is an easy fix.

removed change for personal project to make pull request possible

fixed indenting

fixed indenting

actually fixed indenting
@volontarian
Copy link
Contributor

You get the build green if you write (solution found here: http://www.germane-software.com/software/rexml/docs/tutorial.html):

body.encode(Encoding.find("UTF-8"), :undef => :replace).unpack("C*").pack("U*")

But I think it's better to use UTF8 encoding the way @klinskyc did it, remove the spec example and raise errors here instead of returning a wrong JSON. So with ISO-8859-1 it raises no exception but it returns a hash for [track]...[/track] but not the expected array for [recenttracks][track]...[/track][/recenttracks].

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