[code="java"]require 'open-uri'
open("http://wwwl.baidu.com").read[/code]
得到的内容有乱码,怎么解决乱码问题呢
[quote]
var w=document.f.wd;w.focus();document.getElementById(\"u\").innerHTML='<a href=\"http://passport.baidu.com/?login&tpl=mn&u='+escape(location.href)+'\">\265?\274</a>';function s(o){if(w.value.length>0){var h=o.href;var q=encodeURIComponent(w.value);if(h.indexOf(\"q=\")!=-1){o.href=h.replace(new RegExp(\"q=[^&$]*\"),\"q=\"+q)}else{o.href+=\"?q=\"+q}}};(function(){if(new RegExp(\"q=([^&]+)\").test(location.search)){w.value=decodeURIComponent(RegExp.$1)}})() \260? \270?\266 |
???\271?a> | ??\267®N\260| \271????/a> | About Baidu
©2008 Baidu ??\260??\260\261?|/a> \276\251ICP?030173\272?/a>
<!--9e4e2f483832c794-->[/quote]