Le021 — Component name in non-UTF-8 locale encoding (GB18030 / Shift-JIS / cp1251 / DOS850)

§12.1a encoding/strings (sub-class: locale-specific GB18030 / Shift-JIS / Russian cp1251 / Chinese GB2312)

P1 — silent data loss

spec-violation encoding

Sources

Sender

SolidWorks (Chinese locale), Inventor (Japanese/Korean locales), Russian Windows toolchains, German DOS850 toolchains

Description

A producer writes the literal multi-byte octets of GB18030, Shift-JIS, EUC-JP, cp1251, or CP850 directly into `PRODUCT.name`, `PROPERTY_DEFINITION.description`, label fields, and similar string slots. Ed.1/Ed.2 mandate `\X2\…\X0\` escapes; Ed.3 added UTF-8 only in 2016. Many producers neither escape nor declare an encoding header. UTF-8-only receivers mojibake the strings; older OCCT emitted question-mark replacements.

Reproducer recipe

`PRODUCT('FOO','bar',(0xE6 0xA0 0xB8),..);` — raw multi-byte octets outside `\X2\` blocks; PRODUCT name with cp1251 bytes for "Деталь"; PRODUCT name with raw Shift-JIS `0x82A0` ("ア").

Expected kernel behavior

detect non-UTF-8 byte sequences; provide a settable code page (e.g. `read.step.codepage`); auto-detect via heuristics or warn; convert internally to UTF-8; allow caller override. Strict Ed.2 mode rejects with `E_RAW_NON_ASCII`.

Notes

**See also**: Le022, Le035. Synonyms: "GB18030 bytes raw in STEP product name", "Shift-JIS in PRODUCT.name", "Cyrillic cp1251 chars unescaped", "Japanese characters as raw bytes in STEP", "non-UTF-8 locale bytes in attribute".

Expected validation

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

Byte assertions

Tier-3 assertions

Cross-references

Le022, Le035

Live oracle output

No live oracle data — run _run_corpus to populate.

Fixture content

Show fixture bytes (with defect highlighting)
1ISO-10303-21;
2/* Le021: Component name in non-UTF-8 locale encoding (GB18030 / Shift-JIS / cp1251 / DOS850); Ed.1/Ed.2 mandate \X2\...\X0\ escapes for non-ASCII; SolidWorks (Chinese locale) and Inventor (Japanese/Korean) write raw locale bytes into PRODUCT.name without escaping or declaring an encoding header; raw multi-byte octets outside \X2\ blocks are spec-illegal in Ed.1/Ed.2; this fixture embeds raw UTF-8 multibyte sequences as unescaped bytes, simulating what a producer writing raw locale bytes would emit; UTF-8-only receivers who assume Ed.2 will mojibake; strict Ed.2 mode must reject with E_RAW_NON_ASCII; GEOMETRIC_CURVE_SET IS model entity — OCC yields empty */
3HEADER;
4FILE_DESCRIPTION(('Le021'),'2;1');
5FILE_NAME('Le021.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('æ ¸','cjk-raw-gb18030-he','');
12#8998=PERSON('ア','katakana-raw-shiftjis-a','');
13#8999=PERSON('café','raw-e-acute-not-escaped','');
14#8996=PRODUCT('æ ¸','raw-locale-bytes','raw-product-name',(#9050));
15
16ENDSEC;
17END-ISO-10303-21;