| | |
Handling unicode values in python.
Please support our Python advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Apr 2006
Posts: 8
Reputation:
Solved Threads: 0
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?
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?
I think we just had a discussion related to the same issue at:
http://www.daniweb.com/techtalkforums/thread55436.html
http://www.daniweb.com/techtalkforums/thread55436.html
drink her pretty
![]() |
Similar Threads
- Looking for a Python IDE like NetBeans (Python)
- calling python functions from cpp functions. (Python)
- python extending with c(doubts) (Python)
- Escape and Unescape / Handling (C)
- Character's Unicode Value (Java)
- Running a 3rd party program from Python (Python)
- Inserting Unicode Characters into a List (Python)
- Python and Unicode (Python)
Other Threads in the Python Forum
- Previous Thread: Burned by mutability
- Next Thread: Image Load: MIA
| Thread Tools | Search this Thread |
alarm app beginner cipher cmd cx-freeze data decimals development dictionary directory dynamic error examples feet file float format ftp function generator getvalue gui halp homework http images import input ip itunes java keycontrol leftmouse line linux list lists logging loop maintain maze millimeter module mouse mysqldb number numbers output parsing path port prime programming projects push py2exe pygame pyglet pyqt python queue random recursion schedule screensaverloopinactive script scrolledtext slicenotation sqlite ssh string strings sudokusolver table terminal text thread threading time tkinter tlapse tuple tutorial ubuntu unicode url urllib urllib2 variable variables ventrilo verify vigenere web webservice wikipedia windows wxpython xlwt






