8000 fix encoding detection to use the encoding being tested · kingking888/python-readability@9a31587 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9a31587

Browse files
committed
fix encoding detection to use the encoding being tested
1 parent e4efc87 commit 9a31587

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)
0