Text Processing Modules

unicodedata

Inspect Unicode character properties, names, categories and normalization forms. NFC can combine canonically equivalent sequences; NFKC may also change compatibility distinctions. Normalization is not a general security filter and character counts are not grapheme counts.

Formal Syntax & Structure

python syntaxpython
import unicodedata

Return Value

module

Module namespace available through import; import is a statement, not a value-returning expression.

Working Example

Example Snippetpython
import unicodedata as udtext = "e\u0301"normalized = ud.normalize("NFC", text)print(len(text), len(normalized), ud.name(normalized))
Python Reference