unicode character '\N{ }'

Discussion in 'Python' started by Daewon YOON, Apr 11, 2005.

  1. Daewon YOON

    Daewon YOON Guest

    I learned from http://www.jorendorff.com/articles/unicode/python.html that
    one can specify a unicode character by u'\N {name of the character}'.

    Is there any method that I do the reverse of this process? For example,
    when
    I have a unicode character '£', uc.method() should return the character name
    'POUND SIGN' in str format.

    --
    zooy
    Daewon YOON, Apr 11, 2005
    #1
    1. Advertising

  2. Daewon YOON

    Just Guest

    In article <d3df9u$nml$>,
    Daewon YOON <> wrote:

    > I learned from http://www.jorendorff.com/articles/unicode/python.html that
    > one can specify a unicode character by u'\N {name of the character}'.
    >
    > Is there any method that I do the reverse of this process? For example,
    > when
    > I have a unicode character '£', uc.method() should return the character name
    > 'POUND SIGN' in str format.


    import unicodedata
    name = unicodedata.name(c)

    Just
    Just, Apr 11, 2005
    #2
    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. Velvet
    Replies:
    9
    Views:
    14,778
    Joerg Jooss
    Jan 19, 2006
  2. raavi
    Replies:
    2
    Views:
    901
    raavi
    Mar 2, 2006
  3. cgbusch
    Replies:
    6
    Views:
    7,469
    Mike Brown
    Sep 2, 2003
  4. Kenneth McDonald
    Replies:
    1
    Views:
    815
    Carl Banks
    Dec 27, 2006
  5. Tyler
    Replies:
    1
    Views:
    926
    Robert Klemme
    Jul 29, 2011
Loading...

Share This Page