mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-06 12:41:30 +00:00
Minor just in case update for an Issue #195 (safer behavior on forced charsets)
This commit is contained in:
@@ -1839,10 +1839,7 @@ def getUnicode(value, encoding=None, system=False, noneToNull=False):
|
||||
if isinstance(value, unicode):
|
||||
return value
|
||||
elif isinstance(value, basestring):
|
||||
try:
|
||||
return unicode(value, encoding or kb.pageEncoding)
|
||||
except:
|
||||
return unicode(value, UNICODE_ENCODING, "replace")
|
||||
return unicode(value, encoding or kb.pageEncoding or UNICODE_ENCODING, "replace")
|
||||
else:
|
||||
return unicode(value) # encoding ignored for non-basestring instances
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user