{"action":"reopened","issue":{"url":"https://api.github.com/repos/kennethreitz/requests-html/issues/85","repository_url":"https://api.github.com/repos/kennethreitz/requests-html","labels_url":"https://api.github.com/repos/kennethreitz/requests-html/issues/85/labels{/name}","comments_url":"https://api.github.com/repos/kennethreitz/requests-html/issues/85/comments","events_url":"https://api.github.com/repos/kennethreitz/requests-html/issues/85/events","html_url":"https://github.com/kennethreitz/requests-html/issues/85","id":301986851,"number":85,"title":"decode error","user":{"login":"cxgreat2014","id":15062548,"avatar_url":"https://avatars2.githubusercontent.com/u/15062548?v=4","gravatar_id":"","url":"https://api.github.com/users/cxgreat2014","html_url":"https://github.com/cxgreat2014","followers_url":"https://api.github.com/users/cxgreat2014/followers","following_url":"https://api.github.com/users/cxgreat2014/following{/other_user}","gists_url":"https://api.github.com/users/cxgreat2014/gists{/gist_id}","starred_url":"https://api.github.com/users/cxgreat2014/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cxgreat2014/subscriptions","organizations_url":"https://api.github.com/users/cxgreat2014/orgs","repos_url":"https://api.github.com/users/cxgreat2014/repos","events_url":"https://api.github.com/users/cxgreat2014/events{/privacy}","received_events_url":"https://api.github.com/users/cxgreat2014/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-03-03T10:19:17Z","updated_at":"2018-03-03T12:49:34Z","closed_at":null,"author_association":"NONE","body":"```python\r\nfrom requests_html import HTML\r\nfrom pyquery import PyQuery\r\n\r\ndefault_encoding = 'gbk'\r\ntest_html = \"<html><body><p>Hello World!--你好世界</p></body></html>\".encode(default_encoding)\r\n\r\nelement = HTML(url='http://example.com/hello_world', html=test_html, default_encoding=default_encoding)\r\nprint(element.text)\r\n\r\nprint(PyQuery(test_html)('html').text())\r\nprint(PyQuery(test_html.decode(default_encoding))('html').text())\r\n\r\n```\r\noutput:\r\n```\r\nC:\\Users\\what\\PycharmProjects\\untitled\\venv\\Scripts\\python.exe C:/Users/what/PycharmProjects/requests-html/BUG.py\r\nHello World!--ÄãºÃÊÀ½ç\r\nHello World!--ÄãºÃÊÀ½ç\r\nHello World!--你好世界\r\n\r\nProcess finished with exit code 0\r\n```\r\n\r\nSo, https://github.com/kennethreitz/requests-html/blob/master/requests_html.py#L319 \r\nhtml should be decode."}}
{"actor":{"display_login":"kennethreitz"}}