By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,715 Members | 768 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,715 IT Pros & Developers. It's quick & easy.

Determine size of string in bytes

P: n/a
Forgive me for this question which is most likely stupid...

How do I determine the number of bytes a string takes up? I have a
soap server that is returning a serialized string. It seems that when
the string goes over 65978 characters it does not return to the soap
client. Instead I get an error:
error: (35, 'Resource temporarily unavailable')

This makes me think the problem exists on the soap client side with
some sort of max return length. If I knew how many bytes the 65978
character string was, then I could try to up this value.

Thanks.
Mar 27 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a
En Thu, 27 Mar 2008 16:45:52 -0300, breal <ha**************@gmail.com>
escribió:
Forgive me for this question which is most likely stupid...

How do I determine the number of bytes a string takes up? I have a
soap server that is returning a serialized string. It seems that when
the string goes over 65978 characters it does not return to the soap
client. Instead I get an error:
error: (35, 'Resource temporarily unavailable')
len(x)?
Or do you wan to know how many bytes will have an unicode object when
encoded in a certain encoding? The only way is to actually encode it and
take the length.

--
Gabriel Genellina

Mar 27 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.