PrintableString
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:
| 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.
| 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 |
See also
- The X.690 encoding standard for ASN.1
- IA5String, a superset of PrintableString
References
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.