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 e197720 commit 8dac47fCopy full SHA for 8dac47f
1 file changed
lib/request/basic.py
@@ -137,8 +137,8 @@ def checkCharEncoding(encoding, warn=True):
137
encoding = encoding.replace("5589", "8859") # iso-5589 -> iso-8859
138
elif "2313" in encoding:
139
encoding = encoding.replace("2313", "2312") # gb2313 -> gb2312
140
- elif "x-euc" in encoding:
141
- encoding = encoding.replace("x-euc", "euc") # x-euc-kr -> euc-kr
+ elif encoding.startswith("x-"):
+ encoding = encoding[len("x-"):] # x-euc-kr -> euc-kr / x-mac-turkish -> mac-turkish
142
elif "windows-cp" in encoding:
143
encoding = encoding.replace("windows-cp", "windows") # windows-cp-1254 -> windows-1254
144
0 commit comments