Handling unicode values in python.

Please support our Python advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Apr 2006
Posts: 8
Reputation: swapnamishra is an unknown quantity at this point 
Solved Threads: 0
swapnamishra swapnamishra is offline Offline
Newbie Poster

Handling unicode values in python.

 
0
  #1
Sep 28th, 2006
Hi,

I have a function in Vc++ called Execute.
I pass arguments to the function in hex and it returns the value in hex.
>>> p.Execute(s1)
The return value is handled in unicode format by python.
u'\u1211\u2b08'

I am supposed to convert the hex return value to BCD.
Since python converts it to unicode I have no idea how to proceed.
If I convert to ascii ,I get UncodeEncodeError.
Any suggetions on how to proceed with it?
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 1,546
Reputation: Ene Uran has a spectacular aura about Ene Uran has a spectacular aura about 
Solved Threads: 174
Ene Uran's Avatar
Ene Uran Ene Uran is offline Offline
Posting Virtuoso

Re: Handling unicode values in python.

 
0
  #2
Sep 28th, 2006
I think we just had a discussion related to the same issue at:
http://www.daniweb.com/techtalkforums/thread55436.html
drink her pretty
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC