Skip to content
ASCII World
DC2

Device Control Two

ControlASCII 18 | Hex 0x12 | U+0012
DC2 (code 18) was originally reserved for device-specific control functions. Unlike DC1 (XON) and DC3 (XOFF), DC2 never acquired a universal meaning in the ASCII standard. Some printer protocols used DC2 to switch between compressed and normal print modes. The lack of standardization means DC2's behavior depends entirely on the specific hardware or protocol implementation, and modern systems generally ignore it.

ASCII Code

Decimal
18
Hexadecimal
0x12
Octal
22
Binary
0001 0010

Unicode

Code Point
U+0012
Escape
\u0012
UTF-8 Hex
0xE2 0x90 0x92
UTF-8 Binary
111000101001000010010010
UTF-16
0x0012
UTF-32
0x00000012

HTML Entities

Numeric

Hex


How to Type

HTML Entity

Unicode InputU+0012

Source Code Representations

C / Java
"\u0012"
CSS
\0012
JavaScript
"\u0012"
Perl
\x{0012}
Python 2
u"\u0012"
Python 3
\u0012
Ruby
\u{0012}

Frequently Asked Questions

What is ASCII code 18?
ASCII code 18 represents the Device Control Two character. In hexadecimal it is 0x12, in binary 0001 0010, and in octal 22. This is a non-printable control character used for device signaling and data transmission control.
How do I type ASCII 18 on a keyboard?
Control characters are typically entered using Ctrl key combinations. For example, Ctrl+R produces ASCII 18 in most terminal emulators. You can also use the HTML entity  in web pages.