Step import and cyrillic character

Hi everybody,
I'm in charge of the internalization of a software using OCC to import STEP file.
I'm working with STEPCAFControl_Reader to get the name, hierarchy and color of STEP model.
For english STEP files, no matter, but in the case of russian files, the imported label normally in cyrillic are bad, I get just the figure and some latin character.
Please how can I manage this issue to get the label in cyrillic ?
Thank you

Forum supervisor's picture

Dear Thomas,
We shall be glad to offer you our professional assistance in improvement of support of multi-byte characters in OCCT. We are making step-by-step improvements in this area continuously, however we shall be glad to speed up the process with your help, in case if you will like to invest in such improvements in the frames of a support program, for example. If you feel ready for this kind of cooperation, please contact us via Contact Form

thomas's picture

I've find the good conversion to be able to read cyrillic character from russian STEP file : thanks to the macro "CA2CT varName( string, 1251)" (utf8 to windows1251 codepage conversion) !!!

Fucntion AddSimpleShape( TopoDS_Shape& shape)
TDF_Label aLabel = myAssembly_->FindShape( S$ );
if ( !aLabel.IsNull() )
if ( aLabel.FindAttribute( TDataStd_Name::GetID(), Name) )
tmp = Name->Get();

char tampon[1024];
tampon[0] = '\0';
int i = 1;
while ( i <= tmp.Length() && i < 1025 )
tampon[i-1] = (char) tmp.Value(i);
tampon[i-1] = '\0';

CA2CT inputstring( tampon, 1251);
CString label = CString( inputstring );