1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-08 14:17:06 +03:00

0014673: Provide true support for Unicode symbols

Construction of TCollection_ExtendedString from plain C string is fixed to consider input string as UTF-8 in several places (identified as described in notes to #31113).

Message_MsgFile is corrected to load resource file as UTF-8 (unless it has BOM indicating use of UTF-16).

Added tests for use of Unicode in some DRAW commands (bugs demo bug14673_*)
This commit is contained in:
abv
2020-10-25 22:10:27 +03:00
committed by bugmaster
parent aa7e9f8d78
commit 94f16a8961
17 changed files with 177 additions and 48 deletions

View File

@@ -4690,7 +4690,7 @@ static int VColorScale (Draw_Interpretor& theDI,
return 1;
}
TCollection_ExtendedString aText (theArgVec[anArgIter + 2]);
TCollection_ExtendedString aText (theArgVec[anArgIter + 2], Standard_True);
aColorScale->SetLabel (aText, anIndex);
aColorScale->SetLabelType (Aspect_TOCSD_USER);
anArgIter += 2;
@@ -4797,7 +4797,7 @@ static int VColorScale (Draw_Interpretor& theDI,
TColStd_SequenceOfExtendedString aSeq;
for (Standard_Integer aLabelIter = 0; aLabelIter < aNbLabels; ++aLabelIter)
{
aSeq.Append (TCollection_ExtendedString (theArgVec[++anArgIter]));
aSeq.Append (TCollection_ExtendedString (theArgVec[++anArgIter], Standard_True));
}
aColorScale->SetLabels (aSeq);
aColorScale->SetLabelType (Aspect_TOCSD_USER);
@@ -4839,7 +4839,8 @@ static int VColorScale (Draw_Interpretor& theDI,
Standard_ENABLE_DEPRECATION_WARNINGS
}
aColorScale->SetTitle (theArgVec[anArgIter + 1]);
TCollection_ExtendedString aTitle(theArgVec[anArgIter + 1], Standard_True);
aColorScale->SetTitle (aTitle);
if (isTwoArgs)
{
anArgIter += 1;