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
