Skip to content

Commit 78cac34

Browse files
authored
Merge pull request #96 from ccurvey/master
fix encoding detection to use the encoding being tested
2 parents e4efc87 + 9a31587 commit 78cac34

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

readability/encoding.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def get_encoding(page):
4343
encoding = fix_charset(declared_encoding)
4444

4545
# Now let's decode the page
46-
page.decode()
46+
page.decode(encoding)
4747
# It worked!
4848
return encoding
4949
except UnicodeDecodeError:

0 commit comments

Comments
 (0)