Thursday, 19 April 2018

ASN.1: VisibleString: Create a string variable

Type: VisibleString      

Description: Use this type, when you want to use ASCII characters but not control characters.

Examples
name VisibleString

Example Schema
Person ::= SEQUENCE {
    name VisibleString,
    id VisibleString,
    email IA5String
}

Sample data for above schema
person Person ::= {
    name "Rama Krishna",
    id "I123456",
    email "krishna@krishna.com"
}

XML encoding of above data
<?xml version="1.0" encoding="UTF-8"?>
<Person>
  <name>Rama Krishna</name>
  <id>I123456</id>
  <email>krishna@krishna.com</email>
</Person>




Previous                                                 Next                                                 Home

No comments:

Post a Comment