Missing unicode data?

Discussion in 'Python' started by Klaus Alexander Seistrup, Jun 3, 2006.

  1. Hi group,

    I just came across the following exception:

    #v+

    $ python
    Python 2.4.2 (#2, Sep 30 2005, 21:19:01)
    [GCC 4.0.2 20050808 (prerelease) (Ubuntu 4.0.1-4ubuntu8)] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import unicodedata
    >>> u'\N{LATIN LETTER SMALL CAPITAL BARRED B}'

    UnicodeDecodeError: 'unicodeescape' codec can't decode bytes in position 0-38: unknown Unicode character name
    >>> unicodedata.name(u'\u1d03')

    Traceback (most recent call last):
    File "<stdin>", line 1, in ?
    ValueError: no such name
    >>> ^D

    $

    #v-

    When checking unicodedata.name() against each uchar in the file
    /usr/share/unidata/UnicodeData-4.0.1d1b.txt that came with the
    console-data package on my Ubuntu Linux installation a total of
    1226 unicode characters seems to be missing from the unicodedata
    module (2477 missing characters when checking against the latest
    database from unicode.org¹). Is this a deliberate omission?

    Cheers,
    Klaus.

    ¹) http://www.unicode.org/Public/UNIDATA/UnicodeData.txt
    --
    Klaus Alexander Seistrup
    SubZeroNet, Copenhagen, Denmark
    http://magnetic-ink.dk/
     
    Klaus Alexander Seistrup, Jun 3, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Chip
    Replies:
    1
    Views:
    597
    Joerg Jooss
    Sep 14, 2005
  2. Robert Mark Bram
    Replies:
    0
    Views:
    3,956
    Robert Mark Bram
    Sep 28, 2003
  3. Klaus Alexander Seistrup

    Missing unicode data?

    Klaus Alexander Seistrup, Jun 3, 2006, in forum: Python
    Replies:
    0
    Views:
    298
    Klaus Alexander Seistrup
    Jun 3, 2006
  4. Klaus Alexander Seistrup

    Missing unicode data?

    Klaus Alexander Seistrup, Jun 3, 2006, in forum: Python
    Replies:
    2
    Views:
    362
    Klaus Alexander Seistrup
    Jun 3, 2006
  5. Gary Herron
    Replies:
    2
    Views:
    681
    Bruno Desthuilliers
    Jul 4, 2006
Loading...

Share This Page