Distinguish UTF-8 message text from raw octets
04MSG is the optional free-form event body. It can contain arbitrary octets, or UTF-8 text identified by the required byte order mark. The body’s encoding differs from the ASCII header and structured parameter rules.
Separate BOM-prefixed C0 AF uses a non-shortest representation of slash. It MUST NOT be interpreted as UTF-8. The stop concerns decoding, not a newly invented transport error response.
Source for this drawing: RFC 5424 · Read RFC section 6.4 ↗
New to this? Start hereA quick picture + helpful background
A message needs an address.
Think of a packet as a small addressed envelope. Devices pass it onward; transport protocols decide what delivery promises an application gets.
Helpful first, if these ideas are unfamiliar
These pictures are analogies to help you learn. The linked RFC explains the actual rules.
Terms in this drawing
Related RFCs and changes
“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.
Readable-looking bytes are not enough to claim valid UTF-8.
- The message grammar is HEADER SP STRUCTURED-DATA [SP MSG]. MSG is optional. Without structured-data elements, - still occupies that required field. MSG can be empty (§6).
- MSG SHOULD be Unicode encoded in UTF-8. If the application cannot do that, it MAY use another encoding. When MSG uses UTF-8, it MUST begin EF BB BF, the UTF-8 byte order mark (BOM), and MUST use shortest-form encoding (§6.4).
- A body not starting with BOM is MSG-ANY. Do not assume that such bytes are UTF-8 solely because they look like text. Invalid/non-shortest UTF-8 MUST NOT be interpreted as UTF-8, including in a BOM-prefixed MSG (§6.4).
- Applications SHOULD avoid body octets below32, but these are legal and MAY be modified on reception; other octets SHOULD NOT be modified. This body advice is distinct from required escaping of structured parameter values (§6.4).
The complete fictional example <34>1 - host app - - - followed by SP and BOM+café is31octets. BOM is3octets and café is5, not4. This is an encoding lesson, not a font-dependent character count or full Unicode validator.
Read the RFC section ↗