使用Perl的LWP模块抓取搜房网站列表页时,输出的是乱码。仔细检查:html
上网多放查找,找到解决方案:网站
my %opts = (charset_strict => 1, default_charset => 'cp936', ); $content = $response->decoded_content( %opts );
听说是LWP模块在识别编码上,是有问题的,要手动选择。编码
参考连接:http://bbs.chinaunix.net/thread-4085860-1-1.htmlspa