python unicode support -


i'm trying figure out how use unicode support in python; convert string unicode : "abcde" --> "\x00a\x00b\x00c\x00d\x00e"

any built-in functionnality can that, or shall use join() ?

thanks !

that's utf-16be, not unicode.

>>> 'abcde'.decode('ascii').encode('utf-16be') '\x00a\x00b\x00c\x00d\x00e' 

Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -