Hi,
 
In PER Aligned Encoding of strings, is the length determinant padded so that the string always starts off at a new byte.
 
myString         IA5String(SIZE (1..128))(FROM ("0123456789No. *,"))
 
myString = 101
What will be the encoding for this?
 
This is my understanding from a packet capture:
 
I saw in the packet the encoding for it as follows:
------------- 01 00 43 42 --------------
i.e 0000 0001 0000 0000 0100 0011 0100 0010
 
The first two bits(00) are used as extension bit and representing choice value.
Since the string's size can be between 1 to 128, the number of bits used for decoding length determinant is 7. Hence 00 0001 0 are used for finding length determinant. That is , the length is equal to 3,(2 + 1).
The string yet to be read is 000 0000 0100 0011 0100 0010.
Will the string start from 0100 or 000?
Since the string can take values from "0123456789No. *,", i.e 13 values , 4 bits will be used for encoding each character.
Say , is represented by 0,* by 1,. by 2,0 by 3,1 by 4, 2 by 5 and so on.
So, 101 can  be represented as 434 i.e 0100 0011 0100.
If this is the case, what happens to the seven bits(Marked in Red) in 0000 0001 0000 0000 0100 0011 0100 0010.
Does it mean that for strings, the length determinant is padded for alignment.
 
Please explain if my understanding is wrong.
 
Regards
Surya Santosh


Spice up your IM conversations. New colourful, animated emoticons. Go chatting!
_______________________________________________
ASN1 mailing list
[email protected]
http://lists.asn1.org/mailman/listinfo/asn1

Reply via email to