BodyLength (9) gives the receiver a byte offset. From the first byte after the SOH that terminates tag 9, advancing by the advertised length should land on the 1 in the trailer’s 10=. This includes MsgType, the rest of the session header, the application fields and their delimiters. It also includes any trailer fields that precede CheckSum. FIX Session Layer, field definitions
Measure a TestRequest
Every vertical bar in this complete synthetic FIX 4.4 message represents one SOH. Offsets below start at zero.
8=FIX.4.4|9=61|35=1|49=LAB_A|56=LAB_B|34=18|52=20260115-09:30:01|112=PING-7|10=127|
| Encoded field | Bytes including SOH |
|---|---|
35=1 |
5 |
49=LAB_A |
9 |
56=LAB_B |
9 |
34=18 |
6 |
52=20260115-09:30:01 |
21 |
112=PING-7 |
11 |
The body starts at byte 15. The checksum tag starts at byte 76, so 76 − 15 = 61. If tag 9 says 60, its predicted trailer starts on the last body’s SOH. If it says 62, it lands on the 0 in 10=. Examining several bytes around the predicted boundary quickly distinguishes an off-by-one from a truncated capture.
Preserve the bytes used for measurement
A displayed character can span several bytes. In a length-delimited EncodedText field (355) whose declared encoding is UTF-8, the character é contributes the two bytes C3 A9. Its preceding EncodedTextLen (354) counts those two payload bytes. BodyLength counts the length field, both tags, their equals signs, the payload and each structural delimiter within its scope. Binary Data fields can contain literal SOH bytes. Use the paired length to find their endpoint. FIX TagValue Encoding Standard
Keep the original framing when investigating an incident. A missing separator or an edited log line can put later fields at a plausible but incorrect offset. When making a synthetic variant, finish encoding its fields, measure the body, insert tag 9 and then compute tag 10 over the result. Verifying CheckSum