s no programatically-available list of those names. Try
something like:
name = unicodedata.name(x, some_default) if x > u"\x1f" else ("NULL",
etc etc, "UNIT SEPARATOR")[ord(x)]
or similarly with a prepared dict:
C0_CONTROL_NAMES = {
u"\x00": "NULL"
Hi,
I'd like to get control char names for the first 32 codepoints, but they
apparently only have an alias and no official name. Is there a way to
get the alternative character name (alias) in Python?
--
Greetings,
Dirk
--
http://mail.python.org/mailman/listinfo/python-list
thank you
(it's so obvious i don't know how i could misunderstand)
--
http://mail.python.org/mailman/listinfo/python-list
is the difference between "no name defined" and "not given"?
"no name is defined" refers to the unicode database, "not given"
refers to the default argument. if you don't specify a default, and
the character don't have a known name, you get a ValueEr
;not given"?
eg. '\n' why gives a ValueError?
>>> unicodedata.name(u'\n')
Traceback (most recent call last):
File "", line 1, in ?
ValueError: no such name
--
http://mail.python.org/mailman/listinfo/python-list