GNU Info

Info Node: (python2.1-lib.info)unicodedata

(python2.1-lib.info)unicodedata


Prev: codecs Up: String Services
Enter node , (file) or (file)node

Unicode Database
================

Access the Unicode Database.  This module was written by Marc-Andre
Lemburg <mal@lemburg.com>.
This manual section was written by Marc-Andre Lemburg <mal@lemburg.com>.
This module provides access to the Unicode Character Database which
defines character properties for all Unicode characters. The data in
this database is based on the `UnicodeData.txt' file version 3.0.0
which is publically available from <ftp://ftp.unicode.org/>.

The module uses the same names and symbols as defined by the
UnicodeData File Format 3.0.0 (see
<http://www.unicode.org/Public/UNIDATA/UnicodeData.html>).  It defines
the following functions:

`lookup(name)'
     Look up character by name.  If a character with the given name is
     found, return the corresponding Unicode character.  If not found,
     `KeyError' is raised.

`name(unichr[, default])'
     Returns the name assigned to the Unicode character UNICHR as a
     string. If no name is defined, DEFAULT is returned, or, if not
     given, `ValueError' is raised.

`decimal(unichr[, default])'
     Returns the decimal value assigned to the Unicode character UNICHR
     as integer. If no such value is defined, DEFAULT is returned, or,
     if not given, `ValueError' is raised.

`digit(unichr[, default])'
     Returns the digit value assigned to the Unicode character UNICHR
     as integer. If no such value is defined, DEFAULT is returned, or,
     if not given, `ValueError' is raised.

`numeric(unichr[, default])'
     Returns the numeric value assigned to the Unicode character UNICHR
     as float. If no such value is defined, DEFAULT is returned, or, if
     not given, `ValueError' is raised.

`category(unichr)'
     Returns the general category assigned to the Unicode character
     UNICHR as string.

`bidirectional(unichr)'
     Returns the bidirectional category assigned to the Unicode
     character UNICHR as string. If no such value is defined, an empty
     string is returned.

`combining(unichr)'
     Returns the canonical combining class assigned to the Unicode
     character UNICHR as integer. Returns `0' if no combining class is
     defined.

`mirrored(unichr)'
     Returns the mirrored property of assigned to the Unicode character
     UNICHR as integer. Returns `1' if the character has been
     identified as a "mirrored" character in bidirectional text, `0'
     otherwise.

`decomposition(unichr)'
     Returns the character decomposition mapping assigned to the Unicode
     character UNICHR as string. An empty string is returned in case no
     such mapping is defined.


automatically generated by info2www version 1.2.2.9