ruby-rdf / rdf-rdfxml

Ruby RDF/XML reader/writer for RDF.rb.
http://rubygems.org/gems/rdf-rdfxml
The Unlicense
17 stars 7 forks source link

encoding option from RDF::Reader not passed along to nokogiri #12

Closed ghost closed 11 years ago

ghost commented 12 years ago

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.

gkellogg commented 12 years ago

Thanks for the report, I'll address it for the next release. If you have a reference to a failing test case, that would be useful.

gkellogg commented 11 years ago

Looks like this was completed in 2d38cf4cf4c7adeb74a0afc293dd68bde947de16.