hpricot/hpricot — Issue #62: Hpricot.parse: Encoding::CompatibilityError: incompatible encoding with this operation: UTF-16
Author: dpkendal
Created: 2012-02-20 14:56:33+00:00
State: open

Can't parse parliament.uk briefing papers. Example: http://www.parliament.uk/briefing-papers/SN03170

[14] pry(main)> src = Net::HTTP.get URI.parse 'http://www.parliament.uk/briefing-papers/SN03170';
[15] pry(main)> h = Hpricot.parse src
Encoding::CompatibilityError: incompatible encoding with this operation: UTF-16
from /usr/local/Cellar/ruby/1.9.3-p0/lib/ruby/gems/1.9.1/gems/hpricot-0.8.6/lib/hpricot/parse.rb:33:in `downcase'