About size of Unicode string
Frank Abel Cancio Bello
frankabel at tesla.cujae.edu.cu
Mon Jun 6 13:21:30 EDT 2005
Hi all!
I need know the size of string object independently of its encoding. For
example:
len('123') == len('123'.encode('utf_8'))
while the size of '123' object is different of the size of
'123'.encode('utf_8')
More:
I need send in HTTP request a string. Then I need know the length of the
string to set the header "content-length" independently of its encoding.
Any idea?
Thanks in advance
Frank
More information about the Python-list
mailing list