Hi Experts,
In the attached model, there is a material with the name “Grasgrün”. I can read the name “Grasgrün” from the function SUMaterialGetNameLegacyBehavior(…) on debug environment when locale is “japanese”. Please see my test codes below.
SUStringRef name;
SUSetInvalid( name );
SUStringCreate( &name );
if ( SU_ERROR_NONE == SUMaterialGetNameLegacyBehavior( material, &name ) )
{
// get UTF-8 string length
size_t length;
SUStringGetUTF8Length( name, &length );
// convert SUStringRef to UTF-8 string
char* string = new char[length + 1];
size_t returned_length;
SUStringGetUTF8( name, length, string, &returned_length );
string[length] = '\0';
// free temp variable
delete[] string;
}
However, on release environment and locale is Japanese, when I try to get material name by the function SUMaterialGetNameLegacyBehavior(…), the returned result is SU_ERROR_NONE. When I try to get name length further by the function SUStringGetUTF8Length(…), it tells me that the material name length is 0.
Could you please take a look at the material name issue on release environment when locale is Japanese.
It is a model.
SU_V4_Frankenturm.skp (2.2 MB)