step-examples/12-1a-encoding/Le011.stp
Sources
- N010/ISO 10303-21 Ed.3 §6.4.3 Table 4
- W032/CAD Exchanger CHANGES v3.24.12
Description
`\N\` toggles a notation context. Generators emit it without the spec-required following digit, or assume it means "newline" (it does not; newlines must be encoded as `\X\0A`). The same defect can also span a physical line break in the source.
Reproducer recipe
`'line1\N\line2'` (writer assumed `\N\` == LF).
Expected kernel behavior
spec semantics differ from C `\n`; tolerant readers should at least not crash and should warn that `\N\` is not a newline escape.
Notes
Validation observed: silent-empty rather than the cited crash. Specific crash code path may not be reached at fixture scale; the kernel-mishandling-by-silent-acceptance still demonstrates the defect class. Synonyms: "N directive misread as newline", "literal newline encoded with backslash N", "N notation directive missing operand", "C-style newline escape rejected", "N escape spans line break". Provenance tier: bytes-only (Q5 full-corpus 2026-07-01).
Expected validation
occt=empty/empty gmsh=empty ifc=schema_n/a
Provenance tier
bytes-only — defect not fully embodied in fixture bytes.
Byte assertions
contains(b'\\N\\')count(b'\\N\\') >= 2
Tier-3 assertions
shape_null == True
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes (with defect highlighting)
1ISO-10303-21; 2/* Le011: \N\ notation directive misused as C-style newline escape; \N\ toggles a notation context per ISO 10303-21 §6.4.3 Table 4; it is NOT a newline â a literal newline must be encoded as \X\0A; defect: 'line1\N\line2' â the producer confused \N\ with C '\n'; a tolerant reader must not crash; it should warn that \N\ is not a newline; literal text intended by the producer is silently re-flowed and the loaded attribute differs from the source bytes; multiple \N\ occurrences demonstrate the repeated-misuse pattern; GEOMETRIC_CURVE_SET IS model entity â OCC yields empty */ 3HEADER; 4FILE_DESCRIPTION(('Le011'),'2;1'); 5FILE_NAME('Le011.stp','2026-06-17T00:00:00',(''),(''),'cad-research-suite','',''); 6FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }')); 7ENDSEC; 8DATA; 9#1=CARTESIAN_POINT('',(0.0,0.0,0.0)); 10#2=GEOMETRIC_CURVE_SET('',(#1)); 11#8998=PERSON('line1\N\line2','N-directive-as-newline',''); 12#8999=PERSON('para1\N\para2\N\para3','repeated-N-directive-newline',''); 13 14ENDSEC; 15END-ISO-10303-21;