Text encoding guides

Check the UTF-8 bytes behind a hex field note

·

Hex exposes pieces of a saved note that are invisible in a normal editor. Use the worked note to check accents and emoji while preserving its byte-order mark, tab, line ending and final NUL.

Hex to Text

Decode the 27-byte field note

Leave Direction at Hex to text. Select Load example and Convert. The letters show ID 07: Café, then a compass emoji and a check mark. The result shows 27 UTF-8 bytes, four ASCII control bytes and a retained leading BOM.

The initial EF BB BF bytes are the BOM. The two bytes C3 A9 form é. The four bytes F0 9F A7 AD form the compass emoji. The tab is 09, the line break is 0D 0A, and the final 00 is a NUL.

Worked field-note bytes
EF BB BF 49 44 20 30 37 3A 20 43 61 66 C3 A9 20 F0 9F A7 AD 09 E2 9C 93 0D 0A 00

WHATWG Encoding Standard — UTF-8 and byte-order-mark handling

Convert the unedited result back to hex

Download decoded-text.txt when the file’s exact CRLF and trailing NUL matter. The editor can display the line break as one visible newline.

Select Use result as input. Choose Spaces for Byte separator and select Convert. All 27 byte pairs match the sample. Switch to Dashes and convert again when your destination uses that notation.

Find an incomplete emoji sequence

In Hex to text mode, try 41 F0 9F A7. The result reports an incomplete UTF-8 sequence starting at byte 2, with one continuation byte missing. Add AD to decode A followed by the compass emoji.

If the input ends with only one hex digit, complete the byte pair first. The diagnostic gives the input character position before UTF-8 decoding begins.

WHATWG Encoding Standard — UTF-8 and byte-order-mark handling

Common questions

What does an invalid continuation at byte 3 mean?

The previous bytes began a multi-byte sequence and byte 3 is outside its allowed range. Compare the source bytes before deciding whether to replace or recover one.

Will a decomposed accent survive conversion?

Yes. Encoding uses the input’s Unicode code points without normalization. A letter followed by a combining mark remains that sequence.

Sources

Put it into practice.

Related guides