Question of UTF16BE encoding / decoding

Napalmski ur.liam at iksmlapan.reverse
Tue May 5 08:20:14 CEST 2009


In article <mailman.5089.1241500903.11746.python-list at python.org>, 
metolone+gmane at gmail.com says...
> 
> 
> import binascii
> s = '004e006100700061006c006d'
> h = binascii.unhexlify(s)
> print h.decode('utf-16-be')
> 
> -Mark

And: 
name2 = name2.encode("utf-16-be")
print binascii.b2a_hex(name2)

to re-encode,
Thank you, much appreciated!



More information about the Python-list mailing list