5-bit character encoding used in early teleprinters and telegraph systems. Uses two modes (LETTERS and FIGURES) selected by special shift characters. Educational implementation of International Telegraph Alphabet No. 2 (ITA2/CCITT-2). ITA2 has only 32 five-bit code points per mode and no concept of letter case, so it can only represent the exact uppercase letters, digits, and punctuation listed in its LETTERS/FIGURES tables (plus space, CR, LF and NUL) - any other byte, including lowercase letters and arbitrary binary data, is rejected rather than silently folded or dropped.
| Property | Value |
|---|---|
| Category | Encoding Schemes |
| Sub-category | Telegraph Encoding |
| Security status | π Educational Only |
| Complexity | Beginner |
| Inventor | Γmile Baudot |
| Year | 1874 |
| Origin | π«π· France |
| Restricted input domain | Yes |
| Source | algorithms/encoding/baudot.js |
Status: π Educational Only
No vulnerabilities are recorded for this implementation.
4 vectors ship with this algorithm and run in the test suite. Byte values are hexadecimal.
Vector 1 β Baudot empty string test
| Field | Value |
|---|---|
input |
(empty) |
expected |
(empty) |
Vector 2 β Single letter A test - Baudot ITA2
| Field | Value |
|---|---|
input |
41 |
expected |
03 |
Vector 3 β Letter E encoding test - Baudot
Source: ITU-T F.1 standard
| Field | Value |
|---|---|
input |
45 |
expected |
01 |
| Field | Value |
|---|---|
input |
004100 |
expected |
000300 |