Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: How do you extract hex value of a Unicode character ?

Reply
Thread Tools

Re: How do you extract hex value of a Unicode character ?

 
 
John Lenton
Guest
Posts: n/a
 
      07-15-2004
On Thu, 15 Jul 2004 11:03:06 +0800, Posadas, Dennis
<(E-Mail Removed)> wrote:
> If unichr(x), where x is a value like 0x4EEE will give you the
> character as mapped in the Unicode tables, what is the opposite of
> this command? In other words, how do I get the 0xABCD value from the
> character itself ?


ord returns the ordinal of the character; if it is a unicode
character, the unicode ordinal. In other words, ord(unichr(0xABCD)) ==
0xABCD

--
John Lenton ((E-Mail Removed)) -- Random fortune:
bash: fortune: command not found
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
UTF-8 Character Encodings and "NO-BREAK SPACE" (dec: 202, hex: CA)Character mrdecav@gmail.com HTML 7 02-01-2009 11:05 PM
Hex Color Codes - Hex 6 <=> Hex 3 lucanos@gmail.com HTML 10 08-18-2005 11:21 PM
hex value in string back to real hex value jack Python 4 09-08-2004 07:11 AM
hex(-5) => Futurewarning: ugh, can't we have a better hex than '-'[:n<0]+hex(abs(n)) ?? Bengt Richter Python 6 08-19-2003 07:33 AM



Advertisments