I am sure both Olivier's and my book spell this out pretty thoroughly -
not to mention the Standard (which ***hopefully*** will soon be
available for free on the Web).

The important issue is whether the NumericString type has a
"PER-visible" effective alphabet constraint restricting it to the four
characters "3", "4", "5", and "6".  If it does, then each character will
encode in just two bits and your whole string will take ten bits. 
Whether there is a length field, and of what sort, depends on any
effective length constraint that has been applied to the type.

It is a general comment on the queries that come up on this list that
ASN.1 encodings (and **particularly** PER encodings) depend on the
**type definition** (with any constraints) far more than on the actual
value being encoded.

The point is that a receiver knows the type definition, but hasn't got
clue about the value being sent, so it has to be possible to determine
the value from the encoding using *only* knowledge of the type
definition (and any constraints on the type), as this is the only
"shared knowledge" between the sender and the receiver.

So when someone says "how do I encode xyz", they need to say "value xyz
of type definition pqr" to ask a meaningful question.

PER, and any other encoding rule, would be a bust specification if the
decoding of the encoding of a value required more knowledge than the
type definition of the encoded value, and the encoding rule definition
being employed.

On the other-hand, some (I won't mention the dirty word) mindless
encoding systems assume almost zero shared knowledge between encoder and
decoder, resulting in extremely verbose encodings (a situation which is
aggravated by the use fo a character-based rather than a binary
encoding).

PER assumes a necessary and sufficient shared knowledge, resulting in
robust but efficient encodings.

End of sermon!

John L

========================================================================
                          Prof John Larmouth
   1 Blueberry Road,  Bowdon,  Altrincham,  Cheshire WA14 3LS,  England.
     j.larmouth @ salford.ac.uk              Tel: +44 161 928 1605
        Fax (work): +44 161 745 8169  Tel (work): +44 161 295 5657
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Reply via email to