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