Wr002 — Mixed CRLF and LF line endings within one file

§12.13 writer-pathology (sub-class: whitespace/line-ending)

P3 — cosmetic / metadata-only

writer

Sources

Sender

Windows-hosted writers that build the HEADER block in-memory (CRLF) and append the DATA block from a streamed buffer (LF), or vice versa

Description

The HEADER section uses CRLF (`0x0D 0x0A`) line terminators while the DATA section uses bare LF (`0x0A`), or any other inconsistent mix within one file. Spec-conforming parsers ignore line-ending choice (whitespace), but tools that count lines for diagnostics report misleading line numbers, some text editors display the file as binary, and content-hash-based caches see the file as different from a CRLF-normalised copy. Bug-reporter language: "line numbers in error messages are wrong", "file shows up as binary in editor", "STEP from Windows opens weird on Mac".

Reproducer recipe

HEADER section terminated with `\r\n`, DATA section terminated with `\n`.

Expected kernel behavior

read tolerantly; treat any of `\n`, `\r\n`, or `\r` (classic Mac) as a line terminator. Diagnostics that report a line number should normalise.

Notes

**See also**: Wr042. Cousin of Le028 but emitted by writer rather than introduced by transit.- **Byte assertion**: contains(b'\r\n') and contains(b'\n') Provenance tier: writer-side (Q5 reclassification 2026-07-01).

Expected validation

occt=empty/empty gmsh=empty ifc=schema_n/a

Provenance tier

writer-side — defect not fully embodied in fixture bytes.

Byte assertions

Tier-3 assertions

Cross-references

Wr042, Le028

Live oracle output

No live oracle data — run _run_corpus to populate.

Fixture content

Show fixture bytes (with defect highlighting)
1ISO-10303-21;

2/* Wr002: HEADER uses CRLF, DATA uses LF */

3HEADER;

4FILE_DESCRIPTION(('Wr002 - mixed CRLF/LF line endings'),'2;1');

5FILE_NAME('Wr002.stp','2026-06-20T00:00:00',('auto-generated'),(''),

6  'auto-generated','','');

7FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }'));

8ENDSEC;

9DATA;
10/* Defect: DATA section switches to LF-only line endings */
11#1=CARTESIAN_POINT('p0',(0.,0.,0.));
12#2=CARTESIAN_POINT('p1',(1.,0.,0.));
13#3=CARTESIAN_POINT('p2',(1.,1.,0.));
14#4=CARTESIAN_POINT('p3',(0.,1.,0.));
15#5=GEOMETRIC_CURVE_SET('mixed-endings',());
16ENDSEC;
17END-ISO-10303-21;