fix bug of getting charset from html

I found a page http://www.frozentux.net/iptables-tutorial/cn/iptables-tutorial-cn-1.1.19.html
The author may be wrong, has writed `<META http-equiv=Content-Type content="text/html; charset=gb2312">`
And website like www.taobao.com, It has a meta tag like `<meta charset="gbk" />`
The program can not get encoding from those page, so I modified the code.