Le005 — `\X2\…\X0\` (UCS-2) escape: 3 hex digits in one group

§12.1a encoding/strings (sub-class: `\X2\` directive)

crash encoding

Sources

Description

`\X2\HHHH…\X0\` carries one or more 4-hex-digit UCS-2 code units; the hex run length must be a multiple of four. This entry encodes the 3-hex-digit-group flavor (`\X2\03B\X0\`).

Reproducer recipe

`#1=PERSON('\X2\03B\X0\');` — three hex digits between `\X2\` and `\X0\`.

Expected kernel behavior

validate group count and codepoint range; emit `E_BAD_X2_DIRECTIVE` on malformed input; warn-and-best-effort decode the chars present without crashing.

Notes

Crash potential when an out-of-range value is fed to a downstream UTF-8 encoder. Validation observed: silent-empty rather than the cited crash; the malformed string in PERSON.name does not reach the downstream UTF-8 encoder at fixture scale; the kernel-mishandling-by-silent-acceptance still demonstrates the defect class. **See also**: Le026, Le032, Le051, Le052, Le053. Synonyms: "X2 UCS-2 escape with three hex digits", "X2 hex group not multiple of four", "malformed Unicode escape in PERSON name", "X2 directive odd-length payload", "STEP Unicode escape rejects 3-digit group".

Expected validation

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

Byte assertions

Tier-3 assertions

Cross-references

Le026, Le032, Le051, Le052, Le053

Live oracle output

No live oracle data — run _run_corpus to populate.

Fixture content

Show fixture bytes (with defect highlighting)
1ISO-10303-21;
2/* Le005: \X2\ UCS-2 escape with 3-hex-digit group (not multiple of four); \X2\HHHH…\X0\ requires hex digit count divisible by four (4 digits per UCS-2 code unit); \X2\03B\X0\ has only 3 digits — the group is malformed; receiver must validate group count; emit E_BAD_X2_DIRECTIVE on malformed input; warn-and-best-effort decode without crashing; crash potential when out-of-range value fed to downstream UTF-8 encoder; GEOMETRIC_CURVE_SET IS model entity — OCC yields empty */
3HEADER;
4FILE_DESCRIPTION(('Le005'),'2;1');
5FILE_NAME('Le005.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('\X2\03B\X0\','three-digit-ucs2-group','');
12
13ENDSEC;
14END-ISO-10303-21;