Re: Question of UTF16BE encoding / decoding

2009-05-05 Thread Napalmski
In article , metolone+gm...@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! -- http://m

Question of UTF16BE encoding / decoding

2009-05-04 Thread Napalmski
Hello, I have an encoded string in the form "004e006100700061006c006d", if you split on every 4 characters it decodes to a single character. I have come up with this: name = '004e006100700061006c006d' name2 = "" for x in range(0, len(name), 4): name2 = name2 + chr(int(name[x:x+4], 16)) Is t

Re: python docs for beginner programmer?

2009-05-03 Thread Napalmski
In article <87vdohk791@benfinney.id.au>, ben+pyt...@benfinney.id.au says... > > Deep_Feelings writes: > > > should i try them then after a month of reading i discover that they > > are - for example - not suitable for beginners OR should i ask here > > first ? :) > > You should take on the