step-examples/12-1a-encoding/Le054.stp
Sources
- bug-reporter language: "Word-quotes garbage in STEP", "smart-quote in STEP file"
- deduced from Edition-2 §6.4.3.5 + Windows-CAD vendor practice
Sender
Windows-hosted writers that paste user-input text through a Win32 ANSI codepage without converting to ISO-8859-1
Description
Edition-2 declares ISO-8859-1 as the default 8-bit page. Bytes `0x80.0x9F` in ISO-8859-1 are control characters (C1 controls, no glyphs); in Windows-1252 the same range carries glyphs (Euro sign at 0x80, smart-quotes at 0x91-0x94, em-dash at 0x97, etc.). When a writer copies user-input strings (from a Windows clipboard, a smart-quote-rewriting word processor, or a CAD note containing the Euro sign) it emits raw bytes in 0x80.0x9F into a string literal. Strict Edition-2 readers see C1 control bytes in a string body and either reject, emit `?`, or pass garbage downstream. Tolerant readers heuristically reinterpret as Windows-1252 and recover the intended glyphs but disagree on which receiver is right. Bug-reporter language: "Word smart-quote shows as box character", "Euro sign garbled in STEP", "string contains 0x91 byte and parser reports control char in literal".
Reproducer recipe
a `PRODUCT.name` whose body contains the bytes `\X\91`, `\X\92`, `\X\80`, `\X\97` — left/right single-quote, Euro, em-dash in Windows-1252; or as raw bytes `0x91 0x92 0x80 0x97` inside an Ed.2-declared file.
Expected kernel behavior
surface the ambiguity to the user; name the byte and the page-selection policy. A receiver may treat 0x80.0x9F as Windows-1252 if it documents the policy; or reject on encountering C1 control bytes inside a string body. Silent reinterpretation across vendor policies hides the disagreement.
Notes
Synonyms: "smart-quote in STEP", "cp1252 high-bit", "C1 control byte in string". **See also**: Le002, Le009. Validation observed: silent acceptance; kernel-mishandling-by-silent-page-reinterpretation demonstrates the defect class. 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'\\X\\91') or contains(b'\\X\\92') or contains(b'\\X\\80') or contains(b'\\X\\97')matches(rb'\\X\\(80|91|92|93|94|97|99)')
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/* Le054: High-bit byte ambiguous between Windows-1252 and ISO-8859-1; ISO 10303-21 Ed.2 §6.4.3.5: default 8-bit page is ISO-8859-1; bytes 0x80-0x9F are C1 control characters in ISO-8859-1 (no glyphs); in Windows-1252 the same bytes carry printable glyphs (0x80=Euro, 0x91-0x92=smart single quotes, 0x93-0x94=smart double quotes, 0x97=em-dash, 0x99=trademark); Windows-hosted writers emit raw 0x80-0x9F bytes in string literals without converting to ISO-8859-1 or \X2\ escapes; strict Ed.2 readers see C1 control bytes in string body and reject or corrupt; defect strings contain \X\91, \X\92, \X\80, \X\97 (the \X\ escape form of the ambiguous bytes); receiver must surface the ambiguity: name the byte and the page-selection policy; silent reinterpretation across vendor policies hides the disagreement; GEOMETRIC_CURVE_SET IS model entity â OCC yields empty */ 3HEADER; 4FILE_DESCRIPTION(('Le054'),'2;1'); 5FILE_NAME('Le054.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#8996=PERSON('it\X\92s a \X\91note\X\92','smart-quotes-cp1252-ambiguous',''); 12#8997=PERSON('price \X\80 100','euro-sign-cp1252-ambiguous',''); 13#8998=PERSON('word\X\97word','em-dash-cp1252-ambiguous',''); 14#8999=PERSON('brand\X\99','trademark-cp1252-ambiguous',''); 15 16ENDSEC; 17END-ISO-10303-21;