abhi wrote:
On Jan 13, 12:17 pm, Terry Reedy <tjre...@udel.edu> wrote:
abhi wrote:
Hi,
I am trying to handle Unicode objects in C (Python 2.5.2)....
... I want to convert this explicitely to utf-16....
You are trying to get Unicode and UTF-16, whereas you should think
of those two as distinct. UTF-16 is an encoded form (bytes) from
the abstract "Unicode is characters". What you want in Python is:
u'abc'.encode('UTF-16')
So look for something returning a string by invoking the decode method.
--Scott David Daniels
scott.dani...@acm.org
--
http://mail.python.org/mailman/listinfo/python-list