title: RDF::Reader > Problems with URI::InvalidError
body: <p>I have problems with this code:</p>
  
  <pre><code>require 'rubygems'
  require 'rdf'
  require 'rdf/raptor'
  
  RDF::Reader.open("http://reegle.info/countries/IN.rdf") do |reader|
    reader.each_statement do |statement|
      puts statement.inspect
    end
  end
  </code></pre>
  
  <p>When trying to open the above mentioned url, I get redirected to an url, which URI.parse obviously doesn´t like:</p>
  
  <pre><code>http://sparql.reegle.info?query=CONSTRUCT+{+%3Chttp://reegle.info/countries/IN%3E+?p+?o.+%3Chttp://reegle.info/countries/IN.rdf%3E+foaf:primaryTopic+%3Chttp://reegle.info/countries/IN%3E;+cc:license+%3Chttp://www.nationalarchives.gov.uk/doc/open-government-licence%3E;+cc:attributionName+"REEEP";+cc:attributionURL+%3Chttp://reegle.info/countries/IN%3E.+}+WHERE+{+%3Chttp://reegle.info/countries/IN%3E+?p+?o.}&amp;format=application/rdf%2Bxml
  </code></pre>
  
  <p>So I get the following error:</p>
  
  <pre><code>URI::InvalidURIError: bad URI(is not URI?)
  </code></pre>
  
  <p>Any ideas, how to get around this issue?</p>
  
  <p>Thanks</p>
  
  <p>P.S. Doing something like URI.parse(URI.encode([url]))) does not have any effects here.</p>