From 1bec3a953cb6068c7e13955f2feeed7d525cbb13 Mon Sep 17 00:00:00 2001 From: mkauschi Date: Wed, 2 Sep 2020 17:07:28 +0200 Subject: [PATCH] fix #4325 (#4327) Co-authored-by: manuel --- lib/request/basic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/request/basic.py b/lib/request/basic.py index 168719694..80b662c6f 100644 --- a/lib/request/basic.py +++ b/lib/request/basic.py @@ -353,7 +353,7 @@ def decodePage(page, contentEncoding, contentType, percentDecode=True): if (kb.pageEncoding or "").lower() == "utf-8-sig": kb.pageEncoding = "utf-8" - if page and page.startswith("\xef\xbb\xbf"): # Reference: https://docs.python.org/2/library/codecs.html (Note: noticed problems when "utf-8-sig" is left to Python for handling) + if page and page.startswith(b"\xef\xbb\xbf"): # Reference: https://docs.python.org/2/library/codecs.html (Note: noticed problems when "utf-8-sig" is left to Python for handling) page = page[3:] page = getUnicode(page, kb.pageEncoding)