I am currently having trouble with results from the Amazon API.
The service returns a string with unicode characters: Learn Objective\xE2\x80\x93C on the Mac (Learn Series)
With Ruby 1.9.1 the string could not even been processed:
REXML::ParseException: #<Encoding::CompatibilityError: incompatible encoding regexp match (UTF-8 regexp with ASCII-8BIT string)>
...
Exception parsing
Line: 1
Position: 1636
Last 80 unconsumed characters:
Learn Objective–C on the Mac (Learn Series)
As the exception points, your string is ASCII-8BIT encoded. You should change the encoding. There is a long story about that, but if you are interested in quick solution, just
force_encodingon the string before you do any processing: