From: dpasukhi Date: Wed, 9 Sep 2020 10:02:39 +0000 (+0300) Subject: 0030397: Data Exchange - STEP Reader extension to support entities which have a text... X-Git-Tag: V7_5_0_beta~80 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=e0a25f3d93927335402a1b68a82de36b357f0ac8;p=occt.git 0030397: Data Exchange - STEP Reader extension to support entities which have a text description field with not supported symbols STEP file is now opened in binary mode (instead of text mode) to avoid unexpected handling of control symbols inside string constants. --- diff --git a/src/StepFile/stepread.c b/src/StepFile/stepread.c index aeff1e9181..e0fd83b027 100644 --- a/src/StepFile/stepread.c +++ b/src/StepFile/stepread.c @@ -85,7 +85,7 @@ FILE* stepread_setinput (char* nomfic) { FILE* newin ; if (strlen(nomfic) == 0) return stepin ; - newin = OSD_OpenFile(nomfic,"r"); + newin = OSD_OpenFile(nomfic,"rb"); if (newin == NULL) { return NULL ; diff --git a/tests/bugs/step/bug30397 b/tests/bugs/step/bug30397 new file mode 100644 index 0000000000..ad1244c233 --- /dev/null +++ b/tests/bugs/step/bug30397 @@ -0,0 +1,11 @@ +puts "========================" +puts "0030397: Data Exchange - STEP Reader extension to support entities which have a text description field with not supported symbols" +puts "========================" + +ReadStep D [locate_data_file bug31397.stp] + +set state [data c] + +if { [regexp "141153" $state] != 1 } { + puts "Error : wrong count of transferred roots" +} \ No newline at end of file