Character String Types

All ASN.1 character string types, including multi-byte types such as BMPString and UniversalString, are mapped to the Go string type. The Go string will be interpreted by the generated code as UTF-8.

The useful character string types in ASN.1 are as follows:

   UTF8String        ::=  [UNIVERSAL 12]  IMPLICIT OCTET STRING
   NumericString     ::=  [UNIVERSAL 18]  IMPLICIT IA5String
   PrintableString   ::=  [UNIVERSAL 19]  IMPLICIT IA5String
   T61String         ::=  [UNIVERSAL 20]  IMPLICIT OCTET STRING
   VideotexString    ::=  [UNIVERSAL 21]  IMPLICIT OCTET STRING
   IA5String         ::=  [UNIVERSAL 22]  IMPLICIT OCTET STRING
   UTCTime           ::=  [UNIVERSAL 23]  IMPLICIT GeneralizedTime
   GeneralizedTime   ::=  [UNIVERSAL 24]  IMPLICIT IA5String
   GraphicString     ::=  [UNIVERSAL 25]  IMPLICIT OCTET STRING
   VisibleString     ::=  [UNIVERSAL 26]  IMPLICIT OCTET STRING
   GeneralString     ::=  [UNIVERSAL 27]  IMPLICIT OCTET STRING
   UniversalString   ::=  [UNIVERSAL 28]  IMPLICIT OCTET STRING
   BMPString         ::=  [UNIVERSAL 30]  IMPLICIT OCTET STRING
   ObjectDescriptor  ::=  [UNIVERSAL 7]  IMPLICIT GraphicString