Storing OCAF Documents With Special Characters

Hi,

I would like to store an OCAF document into a path containing a German special character. My code looks like that:

_____

TCollection_ExtendedString pathString (path.c_str(), Standard_True);

PCDM_StoreStatus status = application->SaveAs(persistableDocument.getOcafDocument(), pathString, statusMessage);

if (status != PCDM_SS_OK)
{
    throw Exception("Save status " + std::to_string(status) + " " + TCollection_AsciiString(statusMessage).ToCString(), __TRACE__);
}

_____

When path.c_str() reads "C:/Users/benjamin.bihler/Desktop/Löser/Test.lpb" this won't work because of the "ö" character. The status return value is PCDM_SS_WriteFailure in this case. If I rename Löser to Loser, everything is fine - except that I don't want to mess around with losers all the time. ;-)

I have tried to create the TCollection_ExtendedString also with the constructor argument isMultiByte set to false, but this doesn't help.

Is it possible at all to store OCAF documents into paths containing special characters? How can this be achieved?

Thank you very much,

Benjamin

Benjamin Bihler's picture

I have found the issue "0014673: Provide true support for Unicode symbols" in the issue tracker. Does that mean the storing OCAF documents to paths with special characters might be unsupported right now?