summaryrefslogtreecommitdiff
path: root/bs4/dammit.py
diff options
context:
space:
mode:
Diffstat (limited to 'bs4/dammit.py')
-rw-r--r--bs4/dammit.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bs4/dammit.py b/bs4/dammit.py
index 59640b7..68ed81f 100644
--- a/bs4/dammit.py
+++ b/bs4/dammit.py
@@ -306,7 +306,7 @@ class EncodingDetector:
declared_encoding_match = html_meta_re.search(markup, endpos=html_endpos)
if declared_encoding_match is not None:
declared_encoding = declared_encoding_match.groups()[0].decode(
- 'ascii')
+ 'ascii', 'replace')
if declared_encoding:
return declared_encoding.lower()
return None