Codec lesson · Morse
Morse: turn supported characters into signals
Encode Keyboard uses International Morse for supported Latin letters, digits, and punctuation. Before encoding, it normalizes text so the decoded result may not match the original formatting.
Completed in this browser
Encode Keyboard uses International Morse for supported Latin letters, digits, and punctuation. Before encoding, it normalizes text so the decoded result may not match the original formatting.
Each supported character maps to a sequence of dots and dashes. Spaces separate characters and / separates words. Vietnamese Đ becomes D and diacritics are folded to ASCII before encoding.
How Encode Keyboard handles it
Normalize the text
Đ becomes D, diacritics are removed, letters become uppercase, and repeated whitespace becomes one space.
Map supported characters
Letters, digits, and supported punctuation become dot-and-dash tokens. Any unsupported character makes the transform fail.
Decode token by token
Each token must exist in the Morse table and every / must separate two non-empty words. The output is uppercase ASCII.
Worked example
Xin chào-..- .. -. / -.-. .... .- ---Decoding produces XIN CHAO, not the original lowercase text with its accent.
Good uses
- Learning International Morse patterns
- Practising signal notation
- Encoding simple supported messages
Validation and common errors
- Vietnamese diacritics, case, and whitespace are normalized
- Unsupported symbols cause the operation to fail
- Dots and dashes are public knowledge
Practice in your browser
This uses the same documented rules as the app and runs only in this tab.