From: Sajal Kayan Date: 2008-08-04T17:22:49+09:00 Subject: Re: handling special characters and oh. you would also need to require 'mechanize' in the irb to emulate the issue require 'rubygems' require 'net/http' require 'open-uri' require 'mechanize' require 'iconv' story = Hpricot(open('http://thainews.prd.go.th/newsenglish/previewnews.php?news_id=255108040023' )) body = story.search("//font[@color=\"#333333\"]").inner_html body = body.gsub(/<(.|\n)+?>/, "") body = body.gsub(/’/, "\'") puts body -- Posted via http://www.ruby-forum.com/.