I have the following test code for a possible RoR RSS web app:
require ‘rss’
require ‘open-uri’
$KCODE = “u”
URL = ‘http://macdailynews.com/index.php/weblog/rss_2.0’
open(URL) do |h|
resp = h.read
result = RSS::Parser.parse(resp, false)
puts “Channel: #{result.channel.title}”
result.items.each_with_index do |item, i|
i += 1
puts “#{i} #{item.title}”
end
end
The problem is I still get weird characters (Unicode) in there. How do
I get rid of this?