Merge branch 'develop' of https://github.com/jgorset/requests into redsea

This commit is contained in:
Kenneth Reitz
2012-01-21 06:36:06 -05:00
+3
View File
@@ -276,6 +276,9 @@ def get_encoding_from_headers(headers):
if 'charset' in params:
return params['charset'].strip("'\"")
if 'text' in content_type:
return 'ISO-8859-1'
def unicode_from_html(content):
"""Attempts to decode an HTML string into unicode.