From 5e778490b601e5282abd512ac4e16ba9ae53bebc Mon Sep 17 00:00:00 2001 From: Cavan Klinsky Date: Tue, 9 Dec 2014 22:35:02 -0500 Subject: [PATCH] changed encoding to fix XML parsing issues removed change for personal project to make pull request possible fixed indenting fixed indenting actually fixed indenting --- lib/lastfm/response.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/lastfm/response.rb b/lib/lastfm/response.rb index c6f1432..2b4a89e 100644 --- a/lib/lastfm/response.rb +++ b/lib/lastfm/response.rb @@ -8,7 +8,7 @@ class Response def initialize(body) @xml = XmlSimple.xml_in(body, 'ForceArray' => ['image', 'tag', 'user', 'event', 'correction']) rescue REXML::ParseException - @xml = XmlSimple.xml_in(body.encode(Encoding.find("ISO-8859-1"), :undef => :replace), 'ForceArray' => ['image', 'tag', 'user', 'event', 'correction']) + @xml = XmlSimple.xml_in(body.encode(Encoding.find("UTF-8"), :undef => :replace), 'ForceArray' => ['image', 'tag', 'user', 'event', 'correction']) end def success?