About size of Unicode string

Frank Abel Cancio Bello frankabel at tesla.cujae.edu.cu
Mon Jun 6 19:21:30 CEST 2005

Hi all!

I need know the size of string object independently of its encoding. For

	len('123') == len('123'.encode('utf_8'))

while the size of '123' object is different of the size of

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

More information about the Python-list mailing list