Identification of Unicode characters that cannot be printed

I need to determine (or predict) when the Unicode character will not be available for printing. For example, if I print this default Unicode character, it prints fine:

>>> print(u'\ua62b')

But if I print another Unicode character, it prints like a silly, weird square:

>>> print(u'\ua62c')

I really need to determine before a character is printed if it appears as an ugly square (or sometimes as an anonymous space). What causes this, and how can I predict it?

+4
source share
1 answer

, , script ( , ), , , , , .

\ua62b VAI SYLLABLE NDOLE DO, \ua62c , .

, , unicodedata:

>>> import unicodedata
>>> unicodedata.name(u"\ua62b")
'VAI SYLLABLE NDOLE DO'
>>> unicodedata.name(u"\ua62c")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: no such name

, a ValueError \ua62c, .

- . Cn, :

>>> import unicodedata
>>> unicodedata.category(u"\ua62b")
'Lo'
>>> unicodedata.category(u"\ua62c")
'Cn'
+4

All Articles