[Rails 3.2] REXML::ParseException invalid byte sequence in UTF-8

when parsing an xml response ( UTF-8 encoding) I get a parsing error

response =>
“<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<rss xmlns:opensearch=
"http://a9.com/-/spec/opensearch/1.1/\” xmlns:dc="DCMI: Home
elements/1.1/" version="2.0">\n \n link:http://
lvh.me:3000 - Google Recherche de blogs\n http://
link: - Google Searchhttp://lvh.me:3000&tbm=blg\n
Aucun document ne correspond aux termes de recherche sp
\xE9cifi\xE9s (<b>link:http://lvh.me:3000</b>).</
description>\n opensearch:totalResults0</opensearch:totalResults>
\n opensearch:startIndex1</opensearch:startIndex>\n
opensearch:itemsPerPage10</opensearch:itemsPerPage>\n \n</
rss>"

parse_rss(response)

def parse_rss(body)
xml = REXML::Document.new(body)
REXML::ParseException Exception: #<REXML::ParseException:
#<ArgumentError: invalid byte sequence in UTF-8>

which seems to be raised by the tag with a french text
using accentuated characters… like sp\xE9cifi\xE9s

is it an REXML bug ? ( in this case I may switch to Nokogiri…)
or did I missed any mandatory parameter in my request ?

thanks for your feedback

[SOLVED] found the answer here :

… I forgot to mention I am using Ruby 1.9.3 …

so

xml =
REXML::Document.new(body.force_encoding(“ISO-8859-1”).encode(“UTF-8”))

is the right way to handle the response