[libxml-devel] [ libxml-Bugs-21658 ] failure to parse and obey encoding when creating document
noreply at rubyforge.org
noreply at rubyforge.org
Sun Aug 24 13:01:39 EDT 2008
Bugs item #21658, was opened at 2008-08-24 13:01
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=1971&aid=21658&group_id=494
Category: None
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Nobody (None)
Assigned to: Nobody (None)
Summary: failure to parse and obey encoding when creating document
Initial Comment:
The following appeared on comp.ruby.lang:
===== quoted material follows
I have an XML request,
using the following code as an example:
require "rubygems"
require "xml/libxml"
movie = "sin+city"
search_url = 'http://www.movie-xml.com/interfaces/getmovie.php?moviename='
url = search_url+movie
doc = XML::Document.file(url)
Here's the response I get:
Input is not proper UTF-8, indicate encoding !
The source XML has an encoding declared as such:
<?xml version="1.0" encoding="ISO-8859-1"?>
===== end quoted material
Tested and confirmed, plus I tried the same operation with REXML and there was no problem. It looks like we are not examining the encoding attribute up front and obeying it when parsing the body of the doc.
----------------------------------------------------------------------
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=1971&aid=21658&group_id=494
More information about the libxml-devel
mailing list