Reputation: 33
I have some UCF-2 data in a normal string received from a server. How can I get a unicode() string out of this?
EG: >>> something('\0a\0b\0c') = u'abc'
>>> something('\0a\0b\0c')
u'abc'
Upvotes: 3
Views: 1355
Reputation: 91209
>>> '\0a\0b\0c'.decode('UTF-16BE') u'abc'
Upvotes: 4