gkellogg/rdf-rdfxml — Issue #12: encoding option from RDF::Reader not passed along to nokogiri
Author: giomi
Created: 2012-01-23 17:17:50+00:00
State: open

Hi,

I had a very strange bug today which I solved by forcing nokogiri encoding to 'utf-8'.

While doing that, I noticed that the :encoding option from RDF::Reader is not passed along to Nokogiri::XML.parse call inside the RDF::RDFXML::Reader initializer.

Overwriting the method and changing:

Nokogiri::XML.parse(input, @base_uri.to_s) do |config|
to

Nokogiri::XML.parse(input, @base_uri.to_s, encoding) do |config|

allowed me to solve my other problem.