Method of transmitting text information as a series of on-off tones, lights, or clicks using standardized sequences of short and long signals called dots and dashes. Educational implementation following ITU-R M.1677-1 standard. ITU-R M.1677-1 only defines patterns for uppercase letters, digits, a fixed set of punctuation, and space; it has no case distinction and no representation for control characters or arbitrary binary data, so any other byte is rejected rather than silently mapped to β?β or case-folded.
| Property | Value |
|---|---|
| Category | Encoding Schemes |
| Sub-category | Telegraph Encoding |
| Security status | π Educational Only |
| Complexity | Beginner |
| Inventor | Samuel Morse |
| Year | 1836 |
| Origin | πΊπΈ United States |
| Restricted input domain | Yes |
| Source | algorithms/encoding/morse.js |
Status: π Educational Only
No vulnerabilities are recorded for this implementation.
5 vectors ship with this algorithm and run in the test suite. Byte values are hexadecimal.
Vector 1 β Morse empty string test
| Field | Value |
|---|---|
input |
(empty) |
expected |
(empty) |
Vector 2 β Single letter E test - ITU-R M.1677-1
| Field | Value |
|---|---|
input |
45 |
expected |
2e |
Vector 3 β SOS distress signal test - Morse
Source: ITU-R M.1677-1 standard
| Field | Value |
|---|---|
input |
534f53 |
expected |
2e2e2e202d2d2d202e2e2e |
Vector 4 β Basic word encoding test - Morse
Source: Educational standard
| Field | Value |
|---|---|
input |
48454c4c4f |
expected |
2e2e2e2e202e202e2d2e2e202e2d2e2e202d2d2d |
| Field | Value |
|---|---|
input |
534f532020263d28 |
expected |
2e2e2e202d2d2d202e2e2e202f202f20 2e2d2e2e2e202d2e2e2e2d202d2e2d2d 2e |