PrintableString

Restricted character string type From Wikipedia, the free encyclopedia

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,[1] the character set of PrintableString can be expressed as:

More information Name, Graphic ...
NameGraphicASCII Code (DEC)ASCII Code (HEX)Type
Latin capital lettersA,B, ... Z65 - 9041 - 5ALetter
Latin small lettersa,b, ... z97 - 12261 - 7ALetter
Numbers0,1, ... 948 - 5730 - 39Number
SPACE(space)3220Whitespace
APOSTROPHE'3927Punctuation
LEFT PARENTHESIS(4028Punctuation
RIGHT PARENTHESIS)4129Punctuation
PLUS SIGN+432BPunctuation
COMMA,442CPunctuation
HYPHEN-MINUS-452DPunctuation
FULL STOP.462EPunctuation
SOLIDUS/472FPunctuation
COLON:583APunctuation
EQUALS SIGN=613DPunctuation
QUESTION MARK?633FPunctuation
Close

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.

More information A, B ...
PrintableString character set
0 1 2 3 4 5 6 7 8 9 A B C D E F
0x NUL SOH STX ETX EOT ENQ ACK BEL  BS   HT   LF   VT   FF   CR   SO   SI  
1x DLE DC1 DC2 DC3 DC4 NAK SYN ETB CAN  EM  SUB ESC  FS   GS   RS   US 
2x  SP  ! " # $ % & ' ( ) * + , - . /
3x 0 1 2 3 4 5 6 7 8 9 : ; < = > ?
4x @ A B C D E F G H I J K L M N O
5x P Q R S T U V W X Y Z [ \ ] ^ _
6x ` a b c d e f g h i j k l m n o
7x p q r s t u v w x y z { | } ~ DEL
Close
  Undefined, showing instead the ASCII character at that location)

See also

References

Related Articles

Wikiwand AI