Terminal data

Text, Hex and encodings

Pick the representation that matches the protocol, the encoding that matches the device, and compare the bytes that actually matter.

On this page

Text and Hex workflows

Use Text mode when the protocol is readable: AT commands, startup logs, console output or line-based messages.

Use Hex mode when the protocol is binary: Modbus RTU, private UART frames, sensor packets, bootloader frames or data that contains non-printable bytes.

Practical checks:

  • If text looks garbled, confirm the baud rate first, then check encoding and display mode.
  • If a binary command does not work, compare the exact bytes in Hex mode.
  • For complete messages, configure Append Line Ending instead of typing invisible characters manually. For terminal-style typing in the receive view, configure Enter Sends separately.
  • Keep sample frames with spaces, for example 01 03 00 00 00 02 C4 0B, so they are easier to review.

Text encoding

Text and Hex decide how a message is displayed; the encoding decides which bytes the device actually receives. The two are independent: Chinese devices commonly use GB18030, GBK or Big5, and reading those as UTF-8 produces mojibake — as does the reverse.

Pick the encoding in the Receive Setting and Send Setting groups of the Quick Settings panel, right of the Text/Hex buttons. The Receive and Send pages of the settings dialog carry the same control.

The encoding selector right of Text/Hex in the Receive Setting and Send Setting groups
Receive and send are configured separately. The default is UTF-8, which matches earlier versions.

Available: UTF-8, GB18030, GBK, GB2312, Big5, Shift-JIS, EUC-KR, ISO-8859-1, Windows-1252, System.

What to know:

  • Receive and send are independent. A device that answers in GBK while you prefer to send UTF-8 is a valid configuration.
  • Changes take effect immediately, with no need to reconnect while data is arriving. A half-assembled character is dropped at the switch, which is what changing an encoding should do.
  • Hex mode greys the selector out, because hex is raw bytes — but your choice is kept, so switching back to Text restores it.
  • A character the encoding cannot represent is refused, not substituted. A device cannot tell a substituted ? from one you typed, so nothing is sent: the status bar names the character and the text stays in the box for you to fix. Thai in GBK is one example.
  • Log files are always written as UTF-8, independent of the wire encoding, so they stay readable on any machine.
  • Checksums cover the bytes actually sent. The same text produces different bytes under UTF-8 and GBK, so the checksum differs too.

To diagnose mojibake, check in this order: baud rate, then Text/Hex mode, then encoding. If ASCII is fine and only Chinese, Japanese or Korean characters are wrong, the encoding is almost certainly the cause.

Was this document helpful?