Minor patch (for recognition of x-mac-turkish codec)

This commit is contained in:
Miroslav Stampar 2013-10-21 20:04:48 +02:00
parent e197720def
commit 8dac47f7e5

View File

@ -137,8 +137,8 @@ def checkCharEncoding(encoding, warn=True):
encoding = encoding.replace("5589", "8859") # iso-5589 -> iso-8859 encoding = encoding.replace("5589", "8859") # iso-5589 -> iso-8859
elif "2313" in encoding: elif "2313" in encoding:
encoding = encoding.replace("2313", "2312") # gb2313 -> gb2312 encoding = encoding.replace("2313", "2312") # gb2313 -> gb2312
elif "x-euc" in encoding: elif encoding.startswith("x-"):
encoding = encoding.replace("x-euc", "euc") # x-euc-kr -> euc-kr encoding = encoding[len("x-"):] # x-euc-kr -> euc-kr / x-mac-turkish -> mac-turkish
elif "windows-cp" in encoding: elif "windows-cp" in encoding:
encoding = encoding.replace("windows-cp", "windows") # windows-cp-1254 -> windows-1254 encoding = encoding.replace("windows-cp", "windows") # windows-cp-1254 -> windows-1254