T
Travis Bell
Hey guys,
I think I am missing something very basic here. 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:ocument.file(url)
Now, with most of the XML results I get from movie-xml.com, the default
utf-8 is fine since there are no non-utf-8 characters. When searching
Sin City as an example, there are. 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"?>
So I should probably just decode as ISO-8859-1 as well. How the hell do
I do that? I have Googled the crap out of this and just can't seem to
find what I need here...
I think I am missing something very basic here. 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:ocument.file(url)
Now, with most of the XML results I get from movie-xml.com, the default
utf-8 is fine since there are no non-utf-8 characters. When searching
Sin City as an example, there are. 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"?>
So I should probably just decode as ISO-8859-1 as well. How the hell do
I do that? I have Googled the crap out of this and just can't seem to
find what I need here...