step-examples/12-11-adversarial/Ad116.stp
Sources
- FreeCAD #16886
- bug-reporter language: "STEP import fails on file with Cyrillic name (Ножки.zip)", "fails for files with non-Western paths", "import error with Cyrillic filename".
Sender
Any user with non-Western locale who saves the STEP file under a Cyrillic / Chinese / Japanese filename.
Description
The file content is well-formed Part-21 ASCII; the failure is that the importer (or its OCCT path-handling layer) cannot open the file when the filename or the path contains non-ASCII bytes that the current process locale cannot map. The receiver-side diagnostic surfaces as "import error" with no specific guidance. Distinct from P002 (encoding *inside* the file); here the bytes inside the file are clean and the offending bytes are in the path the OS hands to the reader.
Reproducer recipe
well-formed minimal STEP file (`MANIFOLD_SOLID_BREP` cube). The fixture filename in this repo is plain ASCII (`Ad116.stp`); the catalog entry documents that some readers fail to open the *same content* when saved as `Ножки.stp` or `床.stp`. Provenance tier: bytes-sufficient as a structural representative; the OS-level filename-handling defect is path-side, not file-content-side.
Expected kernel behavior
Heal and accept: file-open path opens via UTF-16 / wide-string Win32 APIs on Windows or UTF-8 path APIs on POSIX; never passes path bytes through `mbstowcs` against the current locale. Reject with E_BAD_PATH_ENCODING if the byte sequence cannot be normalized; never crash.
Notes
**See also**: P002, Le001. Synonyms: "STEP file with Cyrillic filename fails import", "import fails on non-ASCII path", "Ножки.step refuses to open", "Cyrillic file name path encoding bug".
Expected validation
occt=shape(1)/shape(1) gmsh=shape(9) ifc=schema_n/a
Byte assertions
contains(b'MANIFOLD_SOLID_BREP')contains(b'ISO-10303-21')
Tier-3 assertions
load == "ok"
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/* Ad116: Cyrillic / multi-byte filename causes import failure (content is valid) */ 3HEADER; 4FILE_DESCRIPTION(('Ad116'),'2;1'); 5FILE_NAME('Ad116.stp','2026-06-17T00:00:00',(''),(''),'cad-research-suite','',''); 6FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }')); 7ENDSEC; 8DATA; 9#9000=APPLICATION_CONTEXT('mechanical design'); 10#1=CARTESIAN_POINT('',(0.0,0.0,0.0)); 11#2=DIRECTION('',(0.0,0.0,1.0)); 12#3=DIRECTION('',(1.0,0.0,0.0)); 13#4=AXIS2_PLACEMENT_3D('',#1,#2,#3); 14#5=PLANE('',#4); 15#6=CARTESIAN_POINT('',(0.0,0.0,0.0)); 16#7=CARTESIAN_POINT('',(0.0,0.0,1.0)); 17#8=CARTESIAN_POINT('',(0.0,1.0,0.0)); 18#9=CARTESIAN_POINT('',(0.0,1.0,1.0)); 19#10=CARTESIAN_POINT('',(1.0,0.0,0.0)); 20#11=CARTESIAN_POINT('',(1.0,0.0,1.0)); 21#12=CARTESIAN_POINT('',(1.0,1.0,0.0)); 22#13=CARTESIAN_POINT('',(1.0,1.0,1.0)); 23#14=VERTEX_POINT('',#6); 24#15=VERTEX_POINT('',#7); 25#16=VERTEX_POINT('',#8); 26#17=VERTEX_POINT('',#9); 27#18=VERTEX_POINT('',#10); 28#19=VERTEX_POINT('',#11); 29#20=VERTEX_POINT('',#12); 30#21=VERTEX_POINT('',#13); 31#22=DIRECTION('',(0.0,1.0,0.0)); 32#23=VECTOR('',#22,1.0); 33#24=LINE('',#6,#23); 34#25=EDGE_CURVE('',#14,#16,#24,.T.); 35#26=DIRECTION('',(0.0,0.0,1.0)); 36#27=VECTOR('',#26,1.0); 37#28=LINE('',#8,#27); 38#29=EDGE_CURVE('',#16,#20,#28,.T.); 39#30=DIRECTION('',(0.0,-1.0,0.0)); 40#31=VECTOR('',#30,1.0); 41#32=LINE('',#12,#31); 42#33=EDGE_CURVE('',#20,#18,#32,.T.); 43#34=DIRECTION('',(0.0,0.0,-1.0)); 44#35=VECTOR('',#34,1.0); 45#36=LINE('',#10,#35); 46#37=EDGE_CURVE('',#18,#14,#36,.T.); 47#38=ORIENTED_EDGE('',$,$,#25,.T.); 48#39=ORIENTED_EDGE('',$,$,#29,.T.); 49#40=ORIENTED_EDGE('',$,$,#33,.T.); 50#41=ORIENTED_EDGE('',$,$,#37,.T.); 51#42=EDGE_LOOP('',(#38,#39,#40,#41)); 52#43=FACE_OUTER_BOUND('',#42,.T.); 53#44=ADVANCED_FACE('',(#43),#5,.T.); 54#45=CLOSED_SHELL('outer_for_msb',(#44)); 55#46=MANIFOLD_SOLID_BREP('valid_content',#45); 56#9050=PRODUCT_CONTEXT('',#9000,'mechanical'); 57#9051=PRODUCT('Ad116','Ad116','',(#9050)); 58#9052=PRODUCT_DEFINITION_FORMATION('','',#9051); 59#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design'); 60#9054=PRODUCT_DEFINITION('','','',#9052,#9053); 61#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054); 62#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 63#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 64#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 65#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value',''); 66#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D')); 67#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#46),#9060); 68#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061); 69ENDSEC; 70END-ISO-10303-21;