Skip to content

Commit 6bc5f44

Browse files
committed
Minor just in case update for an Issue sqlmapproject#195 (safer behavior on forced charsets)
1 parent efe4c13 commit 6bc5f44

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

lib/core/common.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1839,10 +1839,7 @@ def getUnicode(value, encoding=None, system=False, noneToNull=False):
18391839
if isinstance(value, unicode):
18401840
return value
18411841
elif isinstance(value, basestring):
1842-
try:
1843-
return unicode(value, encoding or kb.pageEncoding)
1844-
except:
1845-
return unicode(value, UNICODE_ENCODING, "replace")
1842+
return unicode(value, encoding or kb.pageEncoding or UNICODE_ENCODING, "replace")
18461843
else:
18471844
return unicode(value) # encoding ignored for non-basestring instances
18481845
else:

0 commit comments

Comments
 (0)