@@ -451,7 +451,7 @@ def readInput(message, default=None):
451451 message += "\n > "
452452
453453 if conf .batch and default :
454- infoMsg = "%s%s" % (message , unicode (default ))
454+ infoMsg = "%s%s" % (message , getUnicode (default ))
455455 logger .info (infoMsg )
456456
457457 debugMsg = "used the default behaviour, running in batch mode"
@@ -517,7 +517,7 @@ def sanitizeStr(inpStr):
517517 @rtype: C{str}
518518 """
519519
520- cleanString = unicode (inpStr )
520+ cleanString = getUnicode (inpStr )
521521 cleanString = cleanString .replace ("\n " , " " ).replace ("\r " , "" )
522522
523523 return cleanString
@@ -1032,7 +1032,7 @@ def safeStringFormat(formatStr, params):
10321032
10331033 if index != - 1 :
10341034 if count < len (params ):
1035- retVal = retVal [:index ] + unicode (params [count ]) + retVal [index + 2 :]
1035+ retVal = retVal [:index ] + getUnicode (params [count ]) + retVal [index + 2 :]
10361036 else :
10371037 raise sqlmapNoneDataException , "wrong number of parameters during string formatting"
10381038 count += 1
@@ -1109,7 +1109,7 @@ def profile(profileOutputFile=None, dotOutputFile=None, imageOutputFile=None):
11091109 import gtk
11101110 import pydot
11111111 except ImportError , e :
1112- errMsg = "profiling requires third-party libraries (%s)" % unicode (e )
1112+ errMsg = "profiling requires third-party libraries (%s)" % getUnicode (e )
11131113 logger .error (errMsg )
11141114 return
11151115
@@ -1370,7 +1370,7 @@ def write(self, fp):
13701370 if self ._defaults :
13711371 fp .write ("[%s]\n " % DEFAULTSECT )
13721372 for (key , value ) in self ._defaults .items ():
1373- fp .write ("%s = %s\n " % (key , unicode (value ).replace ('\n ' , '\n \t ' )))
1373+ fp .write ("%s = %s\n " % (key , getUnicode (value ).replace ('\n ' , '\n \t ' )))
13741374 fp .write ("\n " )
13751375 for section in self ._sections :
13761376 fp .write ("[%s]\n " % section )
@@ -1380,5 +1380,5 @@ def write(self, fp):
13801380 fp .write ("%s\n " % (key ))
13811381 else :
13821382 fp .write ("%s = %s\n " %
1383- (key , unicode (value ).replace ('\n ' , '\n \t ' )))
1383+ (key , getUnicode (value ).replace ('\n ' , '\n \t ' )))
13841384 fp .write ("\n " )
0 commit comments