On this page
unicodedata.name
Prev: unicodedata.mirrored | Up: unicodedata | Next: unicodedata.normalize
Rel: unicodedata.bidirectional, unicodedata.category, unicodedata.combining, unicodedata.decimal
Ref: docs.python.org — unicodedata.name
Tags: #public #python3 #stdlib #unicodedata
Import
import unicodedata
from unicodedata import name
Signature & Overview
unicodedata.name(...)
Returns the name assigned to the character chr as a string.
Usage
import unicodedata
assert unicodedata.name('€') == 'EURO SIGN'
assert unicodedata.name('\x00', 'CONTROL') == 'CONTROL'
Gotchas
- Always pass a
defaultwhen inspecting arbitrary text: Control characters have no Unicode name and raiseValueError.
REPL Inspect
from unicodedata import name
help(name)
Linked from
Related notes
- tuts/python3/stdlib_module/unicodedata/mirrored Linked here; links to this page; shared tags: #stdlib, #unicodedata
- tuts/python3/stdlib_module/unicodedata/normalize Linked here; links to this page; shared tags: #stdlib, #unicodedata
- tuts/python3/stdlib_module/unicodedata Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/unicodedata/bidirectional Linked here; shared tags: #stdlib, #unicodedata
- tuts/python3/stdlib_module/unicodedata/category Linked here; shared tags: #stdlib, #unicodedata
- tuts/python3/stdlib_module/unicodedata/combining Linked here; shared tags: #stdlib, #unicodedata
- tuts/python3/stdlib_module/unicodedata/decimal Linked here; shared tags: #stdlib, #unicodedata
- tuts/python3/stdlib_module/unicodedata/decomposition shared tags: #stdlib, #unicodedata
- tuts/python3/stdlib_module/unicodedata/digit shared tags: #stdlib, #unicodedata
- tuts/python3/stdlib_module/unicodedata/east_asian_width shared tags: #stdlib, #unicodedata