minor update for invalid cases like 'iso-8859-1 (western europe)'

This commit is contained in:
Miroslav Stampar 2011-06-12 08:36:21 +00:00
parent 2da56ea507
commit 0990f16f7f

View File

@ -99,9 +99,9 @@ def checkCharEncoding(encoding):
# http://www.destructor.de/charsets/index.htm
translate = { 'windows-874': 'iso-8859-11', 'en_us': 'utf8', 'macintosh': 'iso-8859-1', 'euc_tw': 'big5_tw' }
for delimiter in (';', ','):
for delimiter in (';', ',', '('):
if delimiter in encoding:
encoding = encoding[:encoding.find(delimiter)]
encoding = encoding[:encoding.find(delimiter)].strip()
# popular typos/errors
if '8858' in encoding: