Le040 — `\Q\` numeric-character-reference at the upper Unicode boundary (U+10FFFF)

§12.1a encoding/strings (sub-class: numeric character reference)

silent-loss spec-violation encoding

Sources

Description

Edition-3 `\Q\xxxx\Q\` encodes a character by its decimal Unicode scalar value between bracketing `\Q\` pairs. Many implementations either ignore `\Q\` entirely (passing digits through verbatim) or accept only values up to `0xFFFF` (BMP only). The largest legal Unicode scalar is `0x10FFFF` (decimal `1114111`); a kernel claiming Edition-3 conformance should be able to decode this upper boundary into a four-byte UTF-8 sequence.

Reproducer recipe

`PRODUCT.name='top=\Q\1114111\Q\'` — the `\Q\.\Q\` payload is the decimal value of U+10FFFF.

Expected kernel behavior

decode `\Q\NNN\Q\` payloads into the corresponding Unicode scalar; reject only values outside the legal scalar range (`> 0x10FFFF` or surrogate halves); do not silently truncate to BMP.

Notes

**See also**: Le030, Le041, Le042. Validation observed: ifcopenshell terminates via process signal — the `\Q\.\Q\` form may interact badly with the parser's ASCII-only string decoder. **OCC behavior**: silently accepts the file and either truncates to BMP or passes the digits through verbatim; kernel mishandling — the catalog above forbids silent BMP truncation. Synonyms: "Q directive at U+10FFFF boundary", "STEP Q encodes max Unicode", "supplementary plane via Q escape", "Q escape decodes high code point", "Q directive at top of Unicode".

Expected validation

occt=empty/empty gmsh=empty ifc=schema_n/a

Byte assertions

Tier-3 assertions

Cross-references

Le030, Le041, Le042

Live oracle output

No live oracle data — run _run_corpus to populate.

Fixture content

Show fixture bytes (with defect highlighting)
1ISO-10303-21;
2/* Le040: \Q\ numeric-character-reference at the upper Unicode boundary U+10FFFF; ISO 10303-21 Ed.3 §6.4.3: \Q\NNN\Q\ encodes a Unicode scalar by decimal value; the largest legal Unicode scalar is U+10FFFF = decimal 1114111; defect string: 'top=\Q\1114111\Q\' — payload 1114111 is the decimal value of U+10FFFF, the topmost supplementary-plane scalar; implementations that only support BMP (up to 0xFFFF=65535) silently truncate or pass the digit sequence through verbatim instead of decoding the scalar; a kernel claiming Edition-3 conformance must decode 1114111 into a valid four-byte UTF-8 sequence (\xF4\x8F\xBF\xBF); ifcopenshell observed to terminate via process signal on \Q\..\Q\ payloads; GEOMETRIC_CURVE_SET IS model entity — OCC yields empty */
3HEADER;
4FILE_DESCRIPTION(('Le040'),'2;1');
5FILE_NAME('Le040.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#8998=PERSON('top=\Q\1114111\Q\','q-ref-at-U10FFFF','');
12#8999=PERSON('hi=\Q\1114110\Q\','q-ref-U10FFFE-below-ceiling','');
13
14ENDSEC;
15END-ISO-10303-21;