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,