1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-10 18:51:21 +03:00

0027585: It is not possible to store OCAF documents to paths with special characters in their names

TCollection_AsciiString - fixed inproper convertion from UTF-16 string.
This commit is contained in:
kgv 2017-01-13 20:24:11 +03:00 committed by apn
parent 6cfc06f00d
commit bda0b631c8

View File

@ -219,9 +219,10 @@ TCollection_AsciiString::TCollection_AsciiString(
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
TCollection_AsciiString::TCollection_AsciiString(const TCollection_ExtendedString& astring, TCollection_AsciiString::TCollection_AsciiString(const TCollection_ExtendedString& astring,
const Standard_Character replaceNonAscii) const Standard_Character replaceNonAscii)
: mystring(0) : mystring (0)
{ {
if (replaceNonAscii || astring.IsAscii()) { if (replaceNonAscii)
{
mylength = astring.Length(); mylength = astring.Length();
mystring = Allocate(mylength+1); mystring = Allocate(mylength+1);
for(int i = 0; i < mylength; i++) { for(int i = 0; i < mylength; i++) {