how to get size of unicode string/string in bytes ?
pattreeya at gmail.com
pattreeya at gmail.com
Tue Aug 1 04:13:51 EDT 2006
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.
More information about the Python-list
mailing list