diff --git a/scrapy/http/response/html.py b/scrapy/http/response/html.py index dc812ac0e..1ef52490c 100644 --- a/scrapy/http/response/html.py +++ b/scrapy/http/response/html.py @@ -18,15 +18,15 @@ class HtmlResponse(TextResponse): _httpequiv_re = _template % ('http-equiv', 'Content-Type') _content_re = _template % ('content', r'(?P[^;]+);\s*charset=(?P[\w-]+)') - _encoding_re = _template % ('encoding', r'(?P[\w-]+)') + _content2_re = _template % ('charset', r'(?P[\w-]+)') METATAG_RE = re.compile(r'Some pagebla bla""" + r1 = self.response_class("http://www.example.com", body=body) + self._assert_response_values(r1, 'gb2312', body) class XmlResponseTest(TextResponseTest):