[xdebug-general] query about the meaning of Property_Get atrribute "size" in DBGp Protocol

From: Dave Kelsey <d_kelsey[@]uk.ibm.com>
Date: Wed, 25 Aug 2010 14:09:37 +0100

Hi Derick

I posted a similar question about this onto the dbgp mailing list, but
haven't had a response. I was wondering what your take on it was.

In DBGp the "size" attribute is stated as "size of property data in bytes "

So this is fine for binary data which will have been encoded to base64
before being sent in the xml document. But how about character data which
isn't encoded to base64 ?

In PDT I use this size to determine if the complete string has been sent,
so how the size is calculated is important to me, especially in a java
environment where the content of the xml document is returned as a unicode
string and it needs to perform an appropriate calculation in order to
compare it to the size attribute. I have 3 choices so far.

   The size is the amount of storage used by the language to store the
   string (Not much use to me as in PDT I don't know how much storage is
   used to store the string received and it isn't going to match what the
   language uses. If the language is implemented in java for example it
   doesn't know what real storage is used.
   The number of bytes used to store the information in the XML document
   (the information will have had to be converted to the encoding of the
   xml document to ensure it is stored correctly and can be converted
   correctly)
   The number of characters rather than the number of bytes as I assume
   that if it isn't base64 encoded it must be valid character data.

Any thoughts you have on this would be really useful.

Best regards
Dave Kelsey
Received on Wed Aug 25 2010 - 14:09:45 BST

This archive was generated by hypermail 2.2.0 : Mon Jun 25 2018 - 06:00:04 BST