A PrintableString is a restricted character string type in the ASN.1 notation. It is used to describe data that consists only of a specific printable subset of the ASCII character set.
According to the ASN.1 Specification of basic notation,Information technology – Abstract Syntax Notation One (ASN.1): Specification of basic notation, ITU-T X.680, 07/2002 the character set of PrintableString can be expressed as:
Name Graphic ASCII Code (DEC) ASCII Code (HEX) Type Latin capital letters A,B, ... Z 65 - 90 41 - 5A Letter Latin small letters a,b, ... z 97 - 122 61 - 7A Letter Numbers 0,1, ... 9 48 - 57 30 - 39 Number SPACE (space) 32 20 Whitespace APOSTROPHE ' 39 27 Punctuation LEFT PARENTHESIS ( 40 28 Punctuation RIGHT PARENTHESIS ) 41 29 Punctuation PLUS SIGN + 43 2B Punctuation COMMA , 44 2C Punctuation HYPHEN-MINUS - 45 2D Punctuation FULL STOP . 46 2E Punctuation SOLIDUS / 47 2F Punctuation COLON : 58 3A Punctuation EQUALS SIGN = 61 3D Punctuation QUESTION MARK ? 63 3F Punctuation
The entire character set contains precisely 74 characters. Namely: 52 letters, 10 digits, 1 whitespace and 11 punctuation character. All of these characters, including space, meet the C character classification of "printable character".
Practical limitations The PrintableString definition does not include the at sign (@) or ampersand (&). Both of these are legal characters in email addresses.
This sometimes causes problems for naive implementers who attempt to put an SMTP email address into an X.509 digital certificate Distinguished Name.
The PrintableString definition does not include asterisk (*) which means it must not be used to represent a wildcard in an X.509 digital certificate Distinguished Name.
Character set The following table shows the PrintableString character set. Each character is shown with the code point of its Unicode equivalent.
See also The X.690 encoding standard for ASN.1 IA5String, a superset of PrintableString
References