About size of Unicode string

  • Thread starter Frank Abel Cancio Bello
  • Start date
F

Frank Abel Cancio Bello

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,241
Messages
2,571,219
Members
47,849
Latest member
RoseannKoz

Latest Threads

Top