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 82bce81 commit 48a67d6Copy full SHA for 48a67d6
1 file changed
lib/request/basic.py
@@ -91,9 +91,19 @@ def parseResponse(page, headers):
91
kb.absFilePaths.add(absFilePath)
92
93
def checkCharEncoding(encoding):
94
+ if encoding:
95
+ encoding = encoding.lower()
96
+ else:
97
+ return encoding
98
+
99
+ #http://www.destructor.de/charsets/index.htm
100
+ translate = { 'windows-874':'iso-8859-11' }
101
102
#http://philip.html5.org/data/charsets-2.html
103
if encoding and encoding.startswith('cp-'):
104
encoding = 'cp%s' % encoding[3:]
105
+ elif encoding in translate:
106
+ encoding = translate[encoding]
107
try:
108
codecs.lookup(encoding)
109
except LookupError:
0 commit comments