[I18n-sig] How can I get the Unicode number (0xABCD) from the character ?

Hye-Shik Chang hyeshik at gmail.com
Fri Jul 16 06:08:03 CEST 2004

Posadas, Dennis wrote:
> Hi All,
>         What is the command in python that would allow me to get the unicode number (0xABCD) of a given unicode character.
> Let's say I had '-' and wanted to get 0x4E00, how would I do it ?

>>> hex(ord(u'\u4e00'))
>>> import unicodedata
>>> unicodedata.name(u'\u4e00')


More information about the I18n-sig mailing list