unicodedata — Unicode 数据库


This module provides access to the Unicode Character Database (UCD) which defines character properties for all Unicode characters. The data contained in this database is compiled from the UCD version 15.1.0 .

The module uses the same names and symbols as defined by Unicode Standard Annex #44, “Unicode Character Database” . It defines the following functions:

unicodedata. lookup ( 名称 )

Look up character by name. If a character with the given name is found, return the corresponding character. If not found, KeyError 被引发。

3.3 版改变: Support for name aliases [ 1 ] and named sequences [ 2 ] has been added.