Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 89e0fc8 commit ae74810Copy full SHA for ae74810
1 file changed
lib/request/basic.py
@@ -156,6 +156,8 @@ def checkCharEncoding(encoding, warn=True):
156
if delimiter in encoding:
157
encoding = encoding[:encoding.find(delimiter)].strip()
158
159
+ encoding = encoding.replace(""", "")
160
+
161
# popular typos/errors
162
if "8858" in encoding:
163
encoding = encoding.replace("8858", "8859") # iso-8858 -> iso-8859
@@ -189,6 +191,8 @@ def checkCharEncoding(encoding, warn=True):
189
191
encoding = "ascii"
190
192
elif encoding.find("utf8") > 0:
193
encoding = "utf8"
194
+ elif encoding.find("utf-8") > 0:
195
+ encoding = "utf-8"
196
197
# Reference: http://philip.html5.org/data/charsets-2.html
198
if encoding in translate:
0 commit comments