mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-06 04:31:30 +00:00
fix for a bug reported by itxx@qq.com (TypeError: encode() takes no keyword arguments)
This commit is contained in:
@@ -647,7 +647,7 @@ def dataToStdout(data, forceOutput=False):
|
||||
try:
|
||||
# Reference: http://bugs.python.org/issue1602
|
||||
if IS_WIN:
|
||||
output = data.encode('ascii', errors="replace")
|
||||
output = data.encode('ascii', "replace")
|
||||
|
||||
if output != data:
|
||||
warnMsg = "cannot properly display Unicode characters "
|
||||
|
||||
@@ -137,7 +137,7 @@ def unicodeencode(value, encoding=None):
|
||||
try:
|
||||
retVal = value.encode(encoding or UNICODE_ENCODING)
|
||||
except UnicodeEncodeError:
|
||||
retVal = value.encode(UNICODE_ENCODING, errors="replace")
|
||||
retVal = value.encode(UNICODE_ENCODING, "replace")
|
||||
return retVal
|
||||
|
||||
def utf8encode(value):
|
||||
|
||||
Reference in New Issue
Block a user