MCPcopy
hub / github.com/pyload/pyload / normalize

Function normalize

module/plugins/internal/misc.py:406–408  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

404
405# Hotfix UnicodeDecodeError: 'ascii' codec can't decode..
406def normalize(value):
407 import unicodedata
408 return unicodedata.normalize('NFKD', value).encode('ascii', 'ignore')
409
410
411#@NOTE: Revert to `decode` in Python 3

Callers 1

processMethod · 0.85

Calls 2

normalizeMethod · 0.80
encodeMethod · 0.45

Tested by

no test coverage detected