step-examples/12-1a-encoding/Le022.stp
Sources
- R052/OCCT bug 25440
- G040/OCCT git log
- S065/sfa-step.tcl:838,1007,1156
Description
STEP names and PMI annotation strings carry Unicode using the spec-conformant `\X2\…\X0\` directive. Older OCCT did not decode the directives at all and emitted question-mark replacements. Some downstream tools (Excel, legacy ANSI receivers) cannot render the result because they lack full Unicode font support, but the file itself is conformant.
Reproducer recipe
`PRODUCT('\X2\03B1\X0\','alpha','desc',..);` (Greek alpha); Japanese characters embedded as `\X2\…\X0\` in `NAME` field.
Expected kernel behavior
Heal and accept: decode all control directives during read; pass through as Unicode; provide `read.step.codepage` for legacy files where the producer used 8-bit code pages instead.
Notes
**See also**: Le021, Le036. Synonyms: "Japanese product name in STEP", "Greek letters in PMI annotation", "X2 Unicode lost on import", "non-ASCII PRODUCT name shows as question marks", "Asian characters dropped on read".
Expected validation
occt=empty/empty gmsh=empty ifc=schema_n/a
Byte assertions
contains(b'\\X2\\03B1\\X0\\')count(b'\\X2\\') >= 1
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/* Le022: Non-ASCII / Japanese / Greek Unicode in PRODUCT.name via \X2\...\X0\ directive; ISO 10303-21 §6.4.3.3: \X2\HHHH...\X0\ encodes UTF-16BE code units; older OCCT did not decode \X2\...\X0\ and emitted question-mark replacements; defect 1: \X2\03B1\X0\ â Greek small letter alpha (U+03B1); defect 2: \X2\30A2\X0\ â Japanese katakana 'A' (U+30A2); conformant file but receivers must correctly decode \X2\ directive; heal and accept: decode all control directives during read; GEOMETRIC_CURVE_SET IS model entity â OCC yields empty */ 3HEADER; 4FILE_DESCRIPTION(('Le022'),'2;1'); 5FILE_NAME('Le022.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\03B1\X0\','greek-alpha',''); 12#8998=PERSON('\X2\30A2\X0\','japanese-katakana-a',''); 13#8999=PERSON('\X2\0041\X0\','ascii-via-x2',''); 14 15ENDSEC; 16END-ISO-10303-21;