MCPcopy Index your code
hub / github.com/sqlmapproject/sqlmap / normalizeUnicode

Function normalizeUnicode

lib/core/common.py:4240–4258  ·  view source on GitHub ↗

Does an ASCII normalization of unicode strings # Reference: http://www.peterbe.com/plog/unicode-to-ascii >>> normalizeUnicode(u'\\u0161u\\u0107uraj') == u'sucuraj' True >>> normalizeUnicode(getUnicode(decodeHex("666f6f00626172"))) == u'foobar' True

(value, charset=string.printable[:string.printable.find(' ') + 1])

Source from the content-addressed store, hash-verified

4238 return retVal
4239
4240def normalizeUnicode(value, charset=string.printable[:string.printable.find(' ') + 1]):
4241 """
4242 Does an ASCII normalization of unicode strings
4243
4244 # Reference: http://www.peterbe.com/plog/unicode-to-ascii
4245
4246 >>> normalizeUnicode(u'\\u0161u\\u0107uraj') == u'sucuraj'
4247 True
4248 >>> normalizeUnicode(getUnicode(decodeHex("666f6f00626172"))) == u'foobar'
4249 True
4250 """
4251
4252 retVal = value
4253
4254 if isinstance(value, six.text_type):
4255 retVal = unicodedata.normalize("NFKD", value)
4256 retVal = "".join(_ for _ in retVal if _ in charset)
4257
4258 return retVal
4259
4260def safeSQLIdentificatorNaming(name, isTable=False):
4261 """

Callers 4

dictionaryAttackFunction · 0.90
dbTableValuesMethod · 0.90
_createTargetDirsFunction · 0.90
dataToOutFileFunction · 0.85

Calls 1

findMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…