match charset in lower case
This commit is contained in:
parent
639b74eac3
commit
3b7b87a89f
1 changed files with 1 additions and 1 deletions
|
@ -71,7 +71,7 @@ def read_url(url, data=None, headers=DEFAULT_HEADERS, return_headers=False, unic
|
|||
|
||||
def detect_encoding(data):
|
||||
if 'content="text/html; charset=utf-8"' in data or \
|
||||
'meta charset="utf-8"' in data:
|
||||
'meta charset="utf-8"' in data.lower():
|
||||
return 'utf-8'
|
||||
elif 'content="text/html; charset=iso-8859-1"' in data:
|
||||
return 'iso-8859-1'
|
||||
|
|
Loading…
Reference in a new issue