diff --git a/doc/THANKS b/doc/THANKS index ee99259ee..a19ed9602 100644 --- a/doc/THANKS +++ b/doc/THANKS @@ -500,6 +500,9 @@ Stuffe Sylphid for suggesting some features +syssecurity.info + for reporting a minor bug + ToR for reporting considerable amount of bugs for suggesting a feature diff --git a/lib/request/basic.py b/lib/request/basic.py index a83954f98..0cdf97073 100644 --- a/lib/request/basic.py +++ b/lib/request/basic.py @@ -103,6 +103,8 @@ def checkCharEncoding(encoding): # http://philip.html5.org/data/charsets-2.html if encoding in translate: encoding = translate[encoding] + elif encoding.startswith('iso-8858'): #very popular typo + encoding = encoding.replace('8858', '8859') elif encoding.startswith('cp-'): encoding = 'cp%s' % encoding[3:] elif encoding.startswith('windows') and not encoding.startswith('windows-'): @@ -110,6 +112,7 @@ def checkCharEncoding(encoding): elif encoding == 'null': return None + # http://www.iana.org/assignments/character-sets try: codecs.lookup(encoding) except LookupError: