From ae7481081e74a7ed8ff99dd2d709b276afccd2f1 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Sat, 19 Dec 2015 23:45:10 +0100 Subject: [PATCH] Patch for an Issue reported via email --- lib/request/basic.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/request/basic.py b/lib/request/basic.py index 21ecd2a34..e87bce1ee 100755 --- a/lib/request/basic.py +++ b/lib/request/basic.py @@ -156,6 +156,8 @@ def checkCharEncoding(encoding, warn=True): if delimiter in encoding: encoding = encoding[:encoding.find(delimiter)].strip() + encoding = encoding.replace(""", "") + # popular typos/errors if "8858" in encoding: encoding = encoding.replace("8858", "8859") # iso-8858 -> iso-8859 @@ -189,6 +191,8 @@ def checkCharEncoding(encoding, warn=True): encoding = "ascii" elif encoding.find("utf8") > 0: encoding = "utf8" + elif encoding.find("utf-8") > 0: + encoding = "utf-8" # Reference: http://philip.html5.org/data/charsets-2.html if encoding in translate: