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.

Standard · ITU Round trip: Normalized: exact only when the source is already canonical supported uppercase ASCII with single spaces.
Learning objective

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.

01

How Encode Keyboard handles it

1

Normalize the text

Đ becomes D, diacritics are removed, letters become uppercase, and repeated whitespace becomes one space.

2

Map supported characters

Letters, digits, and supported punctuation become dot-and-dash tokens. Any unsupported character makes the transform fail.

3

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.

02

Worked example

InputXin chào
Output-..- .. -. / -.-. .... .- ---

Decoding produces XIN CHAO, not the original lowercase text with its accent.

03

Good uses

  • Learning International Morse patterns
  • Practising signal notation
  • Encoding simple supported messages
04

Validation and common errors

  • Vietnamese diacritics, case, and whitespace are normalized
  • Unsupported symbols cause the operation to fail
  • Dots and dashes are public knowledge
05

Practice in your browser

This uses the same documented rules as the app and runs only in this tab.

MorseThis uses the same documented rules as the app and runs only in this tab.
Result

This uses the same documented rules as the app and runs only in this tab.

06

Knowledge check

What will Encode Keyboard recover after Morse-encoding “chào” and decoding it?