fix for a bug reported by Marek Sarvas

This commit is contained in:
Miroslav Stampar 2010-07-26 08:11:28 +00:00
parent 4464d73856
commit 6a6ff09c9a
2 changed files with 6 additions and 1 deletions

View File

@ -269,6 +269,9 @@ Richard Safran <allapplyhere@yahoo.com>
Tomoyuki Sakurai <cherry@trombik.org>
for submitting to the FreeBSD project the sqlmap 0.5 port
Marek Sarvas <marek.sarvas@gmail.com>
for reporting a minor bug
Philippe A. R. Schaeffer <schaeff@compuphil.de>
for reporting a minor bug

View File

@ -100,8 +100,10 @@ def checkCharEncoding(encoding):
translate = { 'windows-874':'iso-8859-11' }
#http://philip.html5.org/data/charsets-2.html
if encoding and encoding.startswith('cp-'):
if encoding.startswith('cp-'):
encoding = 'cp%s' % encoding[3:]
elif ';' in encoding:
encoding = encoding[:encoding.find(';')]
elif encoding in translate:
encoding = translate[encoding]
try: