Discussion Forums

Re: Empy String and "\0" actual lenght
David Rosenborg / Pantor Engineering AB
20 Mar 2009 6:31AM ET

How an empty string is represented within a particular implementation is not specified by the FAST specification. However, it should of course have the length 0.

If the subtraction length is 1 and the base value is the empty string, then this is indeed an error.

When you get the subtraction length 1, is this after you've adjusted it for the excess-1 coding used for nullable string deltas? Otherwise that could explain the problem you're facing.

/David

> Hi, I'm trying to decode the SWX FAST stream, and in particular an
> optional ASCII string attribute (named RandomisedInterval) with delta
> operator and no initial value (default base value 'Empty String' is
> used). Let suppose we have an undefined dictionary previous value (i.e.
> the 'Empty String' should be used as previous value) and we read from
> the stream an ASCII String Delta made by a Substraction Length = 1
> followed by an ASCII String that in that case corresponds to the whole
> RandomisedInterval string "00:02:00".
>
> The problem I'm facing with is quite simple: since I consider the 'Empty
> String' (the default base value) as a string with lenght=0, a
> Substraction Length = 1 (meaning to remove 1 character from the back of
> base value) makes my application to report the error [ERR D7].
>
> I would like to undertand if I'm making a mistake calculating the actual
> length of the 'Empty String' or if the right behaviour is actually to
> report the error.
>
>
> Furthermore, since I also consider the string "\0" as it had length=0, I
> think a similar problem could arise in any case I have a dictionary
> previous value = 'Empty String' or "\0".
>
> Many thanks in advance.


Empy String and "\0" actual lenght
Alessio Mazzanti / List   20 Mar 2009 5:27AM ET
Re: Empy String and "\0" actual lenght
David Rosenborg / Pantor Engineering AB   20 Mar 2009 6:31AM ET
Re: Empy String and "\0" actual lenght
Alessio Mazzanti / List   20 Mar 2009 7:10AM ET
Re: Empy String and "\0" actual lenght
David Rosenborg / Pantor Engineering AB   20 Mar 2009 8:22AM ET
Re: Empy String and "\0" actual lenght
Alessio Mazzanti / List   20 Mar 2009 9:28AM ET
Re: Empy String and "\0" actual lenght
Harly hE / IT   5 Apr 2011 10:38PM ET