View Issue Details

IDProjectCategoryView StatusLast Update
0025533CommunityOCCT:Application Frameworkpublic2017-05-28 17:05
ReporterVico Liang Assigned Toabv 
PrioritynormalSeverityminor 
Status closedResolutionfixed 
PlatformWindowsOSVC++ 2013 
Product Version6.8.0 
Target VersionUnscheduledFixed in Version7.0.0 
Summary0025533: XML unicode path issue.
Descriptionvoid XmlLDrivers_DocumentRetrievalDriver::Read
  (const TCollection_ExtendedString& theFileName,
   const Handle(CDM_Document)& theNewDocument,
   const Handle(CDM_Application)& theApplication)
{
  myReaderStatus = PCDM_RS_DriverFailure;
  myFileName = theFileName;
  Handle(CDM_MessageDriver) aMessageDriver = theApplication -> MessageDriver();
  ::take_time (~0, " +++++ Start RETRIEVE procedures ++++++", aMessageDriver);

  // 1. Read DOM_Document from file
  LDOMParser aParser;
  TCollection_AsciiString aName (theFileName,'?'); //BUG: if theFileName is UTF8 unicode, it will fail to parse.
  if (aParser.parse(aName.ToCString()))
Steps To ReproduceNot required
TagsNo tags attached.
Test case number

Activities

Vico Liang

2014-11-28 14:33

developer   ~0034829

The recomended correction might be adding a new interface in LDOMParser to accept TCollection_ExtendedString as parameter.

Vico Liang

2015-10-05 05:37

developer   ~0046432

Dear szy,

This bug is very easy to fix by changing this line code from:
 TCollection_AsciiString aName (theFileName,'?');
to:
 TCollection_AsciiString aName (theFileName);

Vico Liang

2015-10-05 05:41

developer   ~0046433

Code of below will treat the unicode character as "?":
TCollection_AsciiString aName (theFileName,'?');

so the unicode file will fail to read.

Vico Liang

2015-10-05 05:44

developer   ~0046434

This bug is obviously of carelessness of developer. No need any script to reproduce it, it's enough to check it by static code analysis.

mpv

2017-05-25 14:28

developer   ~0066586

  Dear ABV,

Could you close this bug, since it is obsolete and was fixed automatically by serious modifications related to the issue 26229.

abv

2017-05-28 17:05

manager   ~0066683

Fixed by #26229

Issue History

Date Modified Username Field Change
2014-11-28 14:14 Vico Liang New Issue
2014-11-28 14:14 Vico Liang Assigned To => szy
2014-11-28 14:33 Vico Liang Note Added: 0034829
2015-10-05 05:37 Vico Liang Note Added: 0046432
2015-10-05 05:41 Vico Liang Note Added: 0046433
2015-10-05 05:44 Vico Liang Note Added: 0046434
2016-02-17 18:20 szy Assigned To szy => mpv
2017-05-25 14:28 mpv Note Added: 0066586
2017-05-25 14:28 mpv Assigned To mpv => abv
2017-05-25 14:28 mpv Status new => resolved
2017-05-25 14:28 mpv Steps to Reproduce Updated
2017-05-28 17:05 abv Note Added: 0066683
2017-05-28 17:05 abv Status resolved => closed
2017-05-28 17:05 abv Resolution open => fixed
2017-05-28 17:05 abv Fixed in Version => 7.0.0