step-examples/12-1a-encoding/Le042.stp
Sources
- 16-iso-spec ISO 10303-21 Ed.3 §6.4.3 (decimal-only payload)
Description
`\Q\NNN\Q\` requires the bracketed payload to be a decimal integer. Producers occasionally emit hex (`\Q\1F600\Q\`), an `0x` prefix (`\Q\0x1F600\Q\`), or whitespace around the number (`\Q\ 65 \Q\`). A strict parser rejects; a lenient parser may silently coerce, producing the wrong character (e.g. parsing `F60` as decimal 0 then F-A-A garbage).
Reproducer recipe
`PRODUCT.name='hex=\Q\F60\Q\'`; `'px=\Q\0x41\Q\'`; `'ws=\Q\ 65 \Q\'`.
Expected kernel behavior
reject any non-decimal payload with a precise diagnostic citing the offending characters; never silently substitute 0 for a malformed payload.
Notes
**See also**: Le030, Le040. **OCC behavior**: silently accepts non-decimal `\Q\` payloads and either substitutes 0 or coerces via leading digits; kernel mishandling; the catalog above forbids silent substitution. Synonyms: "Q directive with hex digits", "Q escape with 0x prefix", "Q payload not decimal", "whitespace inside Q numeric", "non-decimal Q payload".
Expected validation
occt=empty/empty gmsh=empty ifc=schema_n/a
Byte assertions
contains(b'\\Q\\0x') or matches(rb'\\Q\\\s')
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
1ISO-10303-21; 2/* Le042: \Q\ payload contains non-decimal characters; ISO 10303-21 Ed.3 §6.4.3: \Q\NNN\Q\ payload must be a decimal integer; producers emit hex digits '\Q\1F600\Q\', an '0x' prefix '\Q\0x41\Q\', or whitespace '\Q\ 65 \Q\' around the number; a strict parser must reject with a precise diagnostic citing the offending characters; a lenient parser that extracts leading decimal digits from '\Q\0x41\Q\' produces decimal 0 instead of 65 (0x41 = 'A'), silently substituting the wrong character; similarly '\Q\F60\Q\' with no leading decimal digit may be coerced to 0 or garbage; never silently substitute 0 for a malformed payload; ifcopenshell observed to terminate via process signal on \Q\..\Q\ payloads; GEOMETRIC_CURVE_SET IS model entity â OCC yields empty */ 3HEADER; 4FILE_DESCRIPTION(('Le042'),'2;1'); 5FILE_NAME('Le042.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('hex=\Q\F60\Q\','q-payload-hex-digits',''); 12#8998=PERSON('px=\Q\0x41\Q\','q-payload-0x-prefix',''); 13#8999=PERSON('ws=\Q\ 65 \Q\','q-payload-whitespace',''); 14 15ENDSEC; 16END-ISO-10303-21;