step-examples/12-1a-encoding/Le002.stp
Sources
- N003/ISO 10303-21 Ed.3 §6.4
Description
Edition 2 declares ISO-8859-1 as the default character set; non-ASCII octets must be expressed via `\X\`, `\X2\`, or page-shift directives. Edition 3 changes the default to UTF-8 (full ISO/IEC 10646). A file produced under one edition and read by a tool assuming the other interprets non-ASCII bytes incorrectly. Conversely, an Ed.3 file using only Ed.2-style `\X\E9` escapes is lawful but is sometimes mis-decoded by parsers that strictly assume raw UTF-8.
Reproducer recipe
an Ed.3 file body containing the raw bytes `\xC3\xA9` for "é"; or an Ed.2 file using `'\X\E9'` read by an Ed.3-only tool.
Expected kernel behavior
Heal and accept: inspect the FILE_DESCRIPTION `implementation_level` and conformance-class declaration to determine edition; accept both forms regardless and never assume the file declares its encoding.
Notes
Synonyms: "STEP file with mixed Ed.2 and Ed.3 encoding", "Edition 2 file read as UTF-8", "raw é byte misread as Latin-1", "non-ASCII byte interpreted by wrong edition", "Edition mismatch on accented characters".
Expected validation
occt=empty/empty gmsh=empty ifc=schema_n/a
Byte assertions
contains(b'\\X\\E9')
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/* Le002: Edition-default encoding mismatch: Ed.2 ISO-8859-1 vs Ed.3 UTF-8; Ed.2 file uses \X\E9 escape for U+00E9 (e-acute); Ed.3-only parser reads raw UTF-8 and misinterprets the \X\E9 escape; receiver must inspect FILE_DESCRIPTION implementation_level to determine edition; accept both forms regardless and never assume file declares its encoding; GEOMETRIC_CURVE_SET IS model entity â OCC yields empty */ 3HEADER; 4FILE_DESCRIPTION(('Le002'),'2;1'); 5FILE_NAME('Le002.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#8999=PERSON('caf\X\E9','Caf\X\E9',''); 12 13ENDSEC; 14END-ISO-10303-21;