Conrad,
Thanks for the reply, and sorry for the imprecision. I was thinking in
particular about these situations for numeric strings:
NoSize ::= NumericString
emptyNoSize NoSize ::= ""
SmallSize ::= NumericString SIZE(0..6)
emptySmallSize SmallSize ::= ""
Both of these require a length determninate with value 0. There is of course
nothing encoded for the string itself, but will the value for the next type
be encoded on an octet boundary due to to the alignment requirements of this
string type? I think not, and Bancroft point out NOTE 2 for 10.9.3.3/X.691
which makes it clear. I just wanted to make sure that that note applies to
my situation at hand.
Paul Long
ipDialog, Inc.
> -----Original Message-----
> From: Conrad Sigona [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, March 13, 2002 6:41 PM
> To: Paul Long
> Cc: [EMAIL PROTECTED]
> Subject: Re: [ASN.1] octet-aligned empty character string using PER
>
>
> On Wed, 13 Mar 2002, Paul Long wrote:
>
> > I'm writing a PER library (for the second time). Got a question about
> > character strings. If a string is supposed to be octet-aligned but has
> > length 0, is "nothing" supposed to be encoded at the next octet
> boundary?
> > IOW, is there supposed to be zero padding out to the next octet
> boundary if
> > not already at an octet boundary? I'm guess that we just forget
> the whole
> > octet-boundary thing if the length is 0 and not encode anything for the
> > string itself (of course) or even do any padding.
>
> How is it you know the length is 0? For instance,
>
> a) is it OPTIONAL and not present,
>
> b) is it
> NoSize ::= PrintableString
> emptyNoSize NoSize ::= ""
>
> c) is it
> SmallSize ::= PrintableString (SIZE (0..6))
> emptySmallSize SmallSize ::= ""
>
> d) is it
> ZeroSize ::= PrintableString (SIZE(0))
> emptyZeroSize ZeroSize ::= ""
>
> The only one that really needs no bits is (d), which while syntactically
> valid, doesn't otherwise make much sense.
>
> =====================================================================
> Conrad Sigona Toll Free : 1-888-OSS-ASN1
> OSS Nokalva Voice Mail : 1-732-302-9669 x400
> [EMAIL PROTECTED] Fax : 1-419-831-5035
> http://www.oss.com My direct line : 1-315-845-1773