View Issue Details

IDProjectCategoryView StatusLast Update
0028172CommunityOCCT:Codingpublic2019-07-10 19:59
ReporterVico Liang Assigned Tokgv  
PrioritynormalSeverityminor 
Status closedResolutionno change required 
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

Relationships

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

Activities

kgv

2016-11-29 07:53

developer   ~0060826

Last edited: 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.

Vico Liang

2016-11-29 08:40

developer   ~0060827

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.

kgv

2016-11-29 08:43

developer   ~0060828

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
2016-11-29 07:54 kgv Note Edited: 0060826
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
2019-07-10 19:59 abv Status new => closed
2019-07-10 19:59 abv Resolution open => no change required
2019-07-10 19:59 abv Target Version 7.4.0 =>