💾 Archived View for tris.fyi › pydoc › unicodedata captured on 2023-04-26 at 13:35:01. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-01-29)

-=-=-=-=-=-=-

Back to module index

Go to module by name

unicodedata

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
13.0.0 which is publicly available from ftp://ftp.unicode.org/.

The module uses the same names and symbols as defined by the
UnicodeData File Format 13.0.0.

Classes

UCD

bidirectional(self, chr, /)

  Returns the bidirectional class assigned to the character chr as string.

  If no such value is defined, an empty string is returned.
category(self, chr, /)

  Returns the general category assigned to the character chr as string.
combining(self, chr, /)

  Returns the canonical combining class assigned to the character chr as integer.

  Returns 0 if no combining class is defined.
decimal(...)

  Converts a Unicode character into its equivalent decimal value.

  Returns the decimal value assigned to the character chr as integer.
  If no such value is defined, default is returned, or, if not given,
  ValueError is raised.
decomposition(self, chr, /)

  Returns the character decomposition mapping assigned to the character chr as string.

  An empty string is returned in case no such mapping is defined.
digit(...)

  Converts a Unicode character into its equivalent digit value.

  Returns the digit value assigned to the character chr as integer.
  If no such value is defined, default is returned, or, if not given,
  ValueError is raised.
east_asian_width(self, chr, /)

  Returns the east asian width assigned to the character chr as string.
is_normalized(self, form, unistr, /)

  Return whether the Unicode string unistr is in the normal form 'form'.

  Valid values for form are 'NFC', 'NFKC', 'NFD', and 'NFKD'.
lookup(self, name, /)

  Look up character by name.

  If a character with the given name is found, return the
  corresponding character.  If not found, KeyError is raised.
mirrored(self, chr, /)

  Returns the mirrored property assigned to the character chr as integer.

  Returns 1 if the character has been identified as a "mirrored"
  character in bidirectional text, 0 otherwise.
name(...)

  Returns the name assigned to the character chr as a string.

  If no name is defined, default is returned, or, if not given,
  ValueError is raised.
normalize(self, form, unistr, /)

  Return the normal form 'form' for the Unicode string unistr.

  Valid values for form are 'NFC', 'NFKC', 'NFD', and 'NFKD'.
numeric(...)

  Converts a Unicode character into its equivalent numeric value.

  Returns the numeric value assigned to the character chr as float.
  If no such value is defined, default is returned, or, if not given,
  ValueError is raised.
unidata_version = <member 'unidata_version' of 'unicodedata.UCD' objects>

Functions

bidirectional

bidirectional(chr, /)

  Returns the bidirectional class assigned to the character chr as string.

  If no such value is defined, an empty string is returned.

category

category(chr, /)

  Returns the general category assigned to the character chr as string.

combining

combining(chr, /)

  Returns the canonical combining class assigned to the character chr as integer.

  Returns 0 if no combining class is defined.

decimal

decimal(...)

  Converts a Unicode character into its equivalent decimal value.

  Returns the decimal value assigned to the character chr as integer.
  If no such value is defined, default is returned, or, if not given,
  ValueError is raised.

decomposition

decomposition(chr, /)

  Returns the character decomposition mapping assigned to the character chr as string.

  An empty string is returned in case no such mapping is defined.

digit

digit(...)

  Converts a Unicode character into its equivalent digit value.

  Returns the digit value assigned to the character chr as integer.
  If no such value is defined, default is returned, or, if not given,
  ValueError is raised.

east_asian_width

east_asian_width(chr, /)

  Returns the east asian width assigned to the character chr as string.

is_normalized

is_normalized(form, unistr, /)

  Return whether the Unicode string unistr is in the normal form 'form'.

  Valid values for form are 'NFC', 'NFKC', 'NFD', and 'NFKD'.

lookup

lookup(name, /)

  Look up character by name.

  If a character with the given name is found, return the
  corresponding character.  If not found, KeyError is raised.

mirrored

mirrored(chr, /)

  Returns the mirrored property assigned to the character chr as integer.

  Returns 1 if the character has been identified as a "mirrored"
  character in bidirectional text, 0 otherwise.

name

name(...)

  Returns the name assigned to the character chr as a string.

  If no name is defined, default is returned, or, if not given,
  ValueError is raised.

normalize

normalize(form, unistr, /)

  Return the normal form 'form' for the Unicode string unistr.

  Valid values for form are 'NFC', 'NFKC', 'NFD', and 'NFKD'.

numeric

numeric(...)

  Converts a Unicode character into its equivalent numeric value.

  Returns the numeric value assigned to the character chr as float.
  If no such value is defined, default is returned, or, if not given,
  ValueError is raised.

Other members

ucd_3_2_0 = <unicodedata.UCD object at 0x7f75e0a09080>
unidata_version = '13.0.0'