require 'net/http' url=%Q(http://blog.sina.com.cn/1789468892) res =Net::HTTP.get_response(URI.parse(url)).body.match(/
require 'net/http' url=%Q(http://blog.sina.com.cn/1789468892) res =Net::HTTP.get_response(URI.parse(url)).body.match(/<title>(.+?)<\/title>/)[1] p res, res.encoding.name res.force_encoding('UTF-8') p res, res.encoding