← LoadfileKit / Guides / DAT encoding trap

The DAT encoding trap

Why the þ delimiter breaks silently · a byte-level diagnosis guide

The most common "my DAT won't parse" ticket is not a delimiter problem at all. The delimiters are fine — the encoding is wrong, and the failure is silent: no error message, just shredded records or garbled custodian names after the load.

The same character, two different byte strings

The Concordance qualifier þ and line-break marker ® are single bytes in Windows-1252 and two bytes in UTF-8:

CharacterWindows-1252 (CP1252)UTF-8
þ (text qualifier)0xFE — one byteC3 BE — two bytes
® (in-value line break)0xAE — one byteC2 AE — two bytes

A parser that assumes the wrong encoding looks for the wrong byte sequence and misses every field boundary:

Why it happens so often

A DAT has no encoding declaration. There is no BOM requirement, no header field, nothing in-band that says which codec produced the file. Older tools — Concordance itself and many vendor export pipelines built on Windows — default to CP1252. Newer cloud platforms increasingly emit UTF-8. When a file passes through production on one platform, QC on a second and import on a third, the encoding can be silently changed at any step.

The most dangerous variant is a mixed-encoding file: someone opens a CP1252 DAT in an editor that assumes UTF-8, makes a one-line edit, and saves. Now most of the file is CP1252 and a few re-saved lines are UTF-8. Per-record repair is the only cure, which is why it is worth catching before it ships.

Diagnosis, in order

StepCheckReading
1First bytes of the fileEF BB BF → UTF-8 with BOM · FF FE → UTF-16 LE · none → keep going
2Strict UTF-8 decode of the first ~64 KBSucceeds with zero errors → almost certainly UTF-8
3Look for the qualifier in the bytesLone FE appearing at regular intervals (field boundaries) → CP1252 with þ delimiters. C3 BE pairs at boundaries → UTF-8
4Fallback scoringTry remaining candidates (Windows-1252, GB18030 when custodians are Chinese) and keep the one where the delimiters survive and the text decodes cleanly

Any hex editor shows you steps 1 and 3 on the first line of the file. If you see FE 44 4F 43 ... it is CP1252; if you see C3 BE 44 4F 43 ... C3 BE it is UTF-8.

What the platforms expect

Relativity's desktop client detects encoding only from a byte order mark. No BOM means it cannot determine the encoding and falls back to the default encoding selected in the import settings — so a BOM-less UTF-8 file can load as Western European without any warning. Relativity's default delimiter set matches the Concordance convention: quote = Unicode 254 (þ), newline = Unicode 174 (®), multi-value = 059 (;). Other platforms differ; some image-load pipelines expect ANSI/Windows-1252 outright. A file with no BOM and no declared encoding is a guess waiting to happen — which is exactly why encoding is checked before anything else on load.

Fixing it

The converter runs this exact detection on every load — BOM honor, strict UTF-8 verification, Windows-1252/GB18030 scoring by delimiter survival — and writes the output back in the same family. The DAT format guide covers the delimiter grammar itself, and the DAT viewer guide shows how to inspect a suspect file without importing it anywhere.

FAQ

Why does my DAT import with à before every þ?

The file is UTF-8 being read as Windows-1252. Re-encode it, or change the import encoding to UTF-8.

Should I just add a BOM?

If the target is Relativity or another BOM-driven detector, yes — a UTF-8 BOM makes detection deterministic. Legacy Concordance Desktop expects CP1252 and may misread the þ if the file is saved as plain UTF-8, so confirm the target platform's expectation first.

Can a DAT be half CP1252 and half UTF-8?

Yes, and it parses as neither cleanly. It happens when an editor re-saves a few lines. Split at the encoding boundary, convert each part, and rejoin — or re-export the whole file from source.