MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0028172Community[OCCT] OCCT:Codingpublic2016-11-29 07:352017-07-20 11:41
ReporterVico Liang 
Assigned Tokgv 
PrioritynormalSeverityminor 
StatusnewResolutionopen 
PlatformOSOS Version
Product Version 
Target Version[OCCT] 7.4.0*Fixed in Version 
Summary0028172: Replace Standard_CString file path with Unicode form TCollection_ExtendedString
DescriptionThere are several classes still use the raw file path form Standard_CString, it's better to unify file path uasge by using TCollection_ExtendedString.

Listed partial interfaces need to be updated:

class BRepTools
static Standard_Boolean Write (const TopoDS_Shape& Sh, const Standard_CString File, const Handle(Message_ProgressIndicator)& PR = NULL);
static Standard_Boolean Read (TopoDS_Shape& Sh, const Standard_CString File, const BRep_Builder& B, const Handle(Message_ProgressIndicator)& PR = NULL);

class BinTools
static Standard_Boolean Write (const TopoDS_Shape& theShape, const Standard_CString theFile);
Standard_Boolean Read (TopoDS_Shape& theShape, const Standard_CString theFile);

class ShapeProcess_Context
ShapeProcess_Context(const Standard_CString file, const Standard_CString scope = "");
Standard_Boolean Init (const Standard_CString file, const Standard_CString scope = "");
Handle(Resource_Manager) LoadResourceManager (const Standard_CString file);

class Font_FontMgr
Handle(Font_SystemFont) CheckFont (const Standard_CString theFontPath) const;

class OpenGl_View
virtual Standard_Boolean Export (const Standard_CString theFileName,
                                                   const Graphic3d_ExportFormat theFormat,
                                                   const Graphic3d_SortType theSortType = Graphic3d_ST_BSP_Tree) Standard_OVERRIDE;

class StlAPI
static void Read (TopoDS_Shape& aShape, const Standard_CString aFile);
static StlAPI_ErrorStatus Write (const TopoDS_Shape& aShape, const Standard_CString aFile, const Standard_Boolean aAsciiMode = Standard_True);

class StlAPI_Reader
void Read (TopoDS_Shape& aShape, const Standard_CString aFileName);

class StlAPI_Writer
StlAPI_ErrorStatus Write(const TopoDS_Shape& theShape, const Standard_CString theFileName)

class STEPControl_Writer
IFSelect_ReturnStatus Write (const Standard_CString filename)

class STEPCAFControl_Reader
IFSelect_ReturnStatus ReadFile (const Standard_CString filename)
Standard_Boolean Perform (const Standard_CString filename,
                         Handle(TDocStd_Document) &doc)
Standard_Boolean Perform (const TCollection_AsciiString &filename,
                         Handle(TDocStd_Document) &doc)

class STEPCAFControl_Writer
IFSelect_ReturnStatus Write (const Standard_CString filename)




TagsNo tags attached.
Test case number
Attached Files

- Relationships
related to 0022484closedbugmaster Open CASCADE UNICODE characters support. 
related to 0025534closedbugmaster Community TObj_Application unicode path issue. 

-  Notes
(0060826)
kgv (developer)
2016-11-29 07:53
edited on: 2016-11-29 07:54

> it's better to unify file path uasge by using TCollection_ExtendedString
There is NO intention of using TCollection_ExtendedString across OCCT for file paths (apart from already existing occurrences like in OCAF - for historical reasons).

TCollection_ExtendedString represents UTF-16 which makes no sense on most platforms save the Windows.
Therefore Standard_CString can be potentially replaced by TCollection_AsciiString (UTF-8) in these interfaces.

(0060827)
Vico Liang (developer)
2016-11-29 08:40

Dear kgv,

The best practice would be a uniform interface for external user. Therefore OCCT users don't have to consider to use diference file path in diference functions and it would be easy to lean and it also improves the work productivity.
(0060828)
kgv (developer)
2016-11-29 08:43

It is already unified - 99% places use Standard_CString in OCCT for passing file paths. There are only few exceptions.

- Issue History
Date Modified Username Field Change
2016-11-29 07:35 Vico Liang New Issue
2016-11-29 07:35 Vico Liang Assigned To => kgv
2016-11-29 07:53 kgv Note Added: 0060826
2016-11-29 07:53 kgv Note Edited: 0060826 View Revisions
2016-11-29 07:54 kgv Note Edited: 0060826 View Revisions
2016-11-29 07:55 kgv Relationship added related to 0022484
2016-11-29 08:40 Vico Liang Note Added: 0060827
2016-11-29 08:43 kgv Note Added: 0060828
2016-11-29 08:44 kgv Relationship added related to 0025534
2017-07-20 11:41 kgv Target Version 7.2.0 => 7.4.0*


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker