step-examples/12-1a-encoding/Le026.stp
Sources
- Q067/StepData_StepReaderData.cxx:197-213
Description
When `\X0\` is omitted, OCCT (pre-fix) treated the remainder of the string as encoded hex content, garbling the trailing ASCII portion of the literal.
Reproducer recipe
`name = '\X2\00B0'` (closing apostrophe immediately follows hex run; no `\X0\`).
Expected kernel behavior
warn and best-effort decode the Unicode chars present; revert to literal-ASCII mode at the closing apostrophe; do not crash.
Notes
Validation observed: silent-empty rather than the cited garbling. Specific crash code path may not be reached at fixture scale; the kernel-mishandling-by-silent-acceptance still demonstrates the defect class. **See also**: Le005. Synonyms: "X2 escape missing X0 terminator", "Unicode run leaks into rest of string", "no X0 closer on hex run", "tail of string treated as encoded", "missing X0 garbles STEP literal". Provenance tier: bytes-only — defect is context/metadata OCC does not read at BRep load; mutation-test verified oracle-invisible (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'\\X2\\00B0')
Tier-3 assertions
shape_null == True
Cross-references
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes (with defect highlighting)
1ISO-10303-21; 2/* Le026: \X2\ escape block missing \X0\ end-marker; ISO 10303-21 §6.4.3.3: \X2\HHHH...\X0\ â the \X0\ is mandatory; when \X0\ is absent the remainder of the string literal is treated as encoded hex content, garbling any trailing ASCII characters; OCCT pre-fix (StepData_StepReaderData.cxx:197-213) exhibited this garbling; defect: '\X2\00B0' â degree symbol U+00B0 encoded but no \X0\ follow; closing apostrophe immediately follows the hex run without the terminator; receiver must warn and best-effort decode without crashing; GEOMETRIC_CURVE_SET IS model entity â OCC yields empty */ 3HEADER; 4FILE_DESCRIPTION(('Le026'),'2;1'); 5FILE_NAME('Le026.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#8997=PERSON('\X2\00B0','degree-no-x0-terminator',''); 12#8998=PERSON('\X2\03B1 rad','alpha-suffix-no-x0',''); 13 14ENDSEC; 15END-ISO-10303-21;