Quantcast
Channel: QtWebEngine
Viewing all articles
Browse latest Browse all 13965

how to detect the character encoding of a web page programmatically ?

$
0
0
I want to get a web page source code by Qt or PyQt ,I know how to get the encoded source code ,then I need get the codec in order to convert it into plain text ,so the problem is how to detect the character encoding of a web page programmatically ?can anyone help ? this page is encoded by UTF8 http://www.flvxz.com/getFlv.php?url=aHR0cDojI3d3dy41Ni5jb20vdTk1L3ZfT1RFM05UYzBNakEuaHRtbA== and this one is encoded by gb2312 http://www.qnwz.cn/html/yinlegushihui/magazine/2013/0524/425731.html your answer should test on this 2 page

Viewing all articles
Browse latest Browse all 13965

Latest Images

Trending Articles



Latest Images