e.g. I use utf8 as encoding/decoding, s = "ทดสอบ" u = s.decode("utf-8") how can I get size of u ?
[EMAIL PROTECTED] schrieb: > Hello, > > how can I get the number of byte of the string in python? > with "len(string)", it doesn't work to get the size of the string in > bytes if I have the unicode string but just the length. (it only works > fine for ascii/latin1) In data structure, I have to store unicode > string for many languages and must know exactly how big of my string > which is stored so I can read back later. > > Many thanks for any suggestion. > > cheers! > pattreeya. -- http://mail.python.org/mailman/listinfo/python-list