View Issue Details

IDProjectCategoryView StatusLast Update
0026514Open CASCADEOCCT:Foundation Classespublic2020-10-28 06:37
ReportervtnAssigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
PlatformLinuxOSRHEL 
Product Version6.3.1 
Target Version7.0.0Fixed in Version7.0.0 
Summary0026514: OSD_Path can not work with French symbols in file name.
DescriptionIf we have file like découverte.xml then OSD_Path raise an exception in OSD_Path::SetValues function. The Nam.IsAscii() returns Standard_False.

In other hand if we have TCollection_ExtendedString (aNameExt) with "découverte.xml" then the following command do nothing:
TCollection_AsciiString aName( aNameExt, '_' )
because IsAnAscii(c) function returns Standard_True in TCollection_AsciiString constructor.
Steps To Reproducehttp://diagrams.mantis.opencascade.com/view.php?id=534
TagsNo tags attached.
Test case numberNot needed

Relationships

related to 0024716 closedbugmaster Open CASCADE OSD_Path - remove excessive validity checks and allow non-ascii strings 
related to 0022484 closedbugmaster Open CASCADE UNICODE characters support. 
parent of 0027100 closedabv Open CASCADE OSD_Path missing constructor accepting path parameter as TCollection_ExtendedString 
related to 0027585 closedapn Community It is not possible to store OCAF documents to paths with special characters in their names 

Activities

git

2015-08-03 20:03

administrator   ~0043799

Branch CR26514 has been created by mnt.

SHA-1: f2237719783619358958440b9477fe4787a9d029


Detailed log of new commits:

Author: User for GUITHARE project
Date: Mon Aug 3 20:02:20 2015 +0300

    0026514: OSD_Path can not work with French symbols in file name.

kgv

2015-08-03 21:03

developer   ~0043800

Patch author name is wrong, please fix it.

git

2015-08-04 11:21

administrator   ~0043801

Branch CR26514 has been updated forcibly by inv.

SHA-1: b0676397e86784190a179b36f4cc6887dc710d87

abv

2015-08-12 10:41

manager   ~0044018

The patch is incorrect. Function IsAnAscii() accepts ExtCharacter (two-byte word) and returns True if it fits into one byte. It will always return True for char argument, thus method TCollection_AsciiString::IsAscii() will always return true.

By original intent, method IsAscii() indicates whether string contains only basic ASCII symbols (0-127), except control symbols (0-31). This perhaps needs revision.

Non-Ascii symbols, such as French letters, can be put to TCollection_AsciiString in two variants:

- as extended Ascii symbols, in current locale
- in UTF-8 encoding

Current convention is to use UTF-8 encoding. This allows storing any Unicode symbols in TCollection_AsciiString, and use it e.g. for work with file names. Most of OCCT functionality working with files (STEP, IGES, BREP reader/writers, etc.) already support this.

I propose the following approach:

- in OCCT: remove checks for IsAscii() from OSD_Path. Though some checks might be useful, they rather should be system-specific (e.g. check that file name does not contains punctuation symbols), it is unlikely worth doing that now.

- in your application: convert localized strings to UTF-8 before putting it to TCollection_AsciiString. When it is converted to ExtendedString, use MultiByte argument of constructor. If you are operate with files directly, consider using utility functions defined in OSD_File.hxx.

vtn

2015-08-24 10:46

developer   ~0044531

The problem is fixed inside DIAGRAM sources.

git

2016-01-07 21:15

administrator   ~0049716

Branch CR26514_1 has been created by abv.

SHA-1: 5c3166471a0af24ed850bec35c613abba0542877


Detailed log of new commits:

Author: abv
Date: Thu Jan 7 21:15:29 2016 +0300

    0026514: OSD_Path can not work with French symbols in file name.
    
    Restriction on path to contain only basic ASCII symbols is removed in OSD_Path, to allow paths to contain any symbols (defined in UTF-8 encoding).

abv

2016-01-07 21:16

manager   ~0049717

Fix pushed to CR26514, please review

kgv

2016-01-08 10:35

developer   ~0049729

Please test the patch. Test case is not needed.

apv

2016-01-12 16:05

tester   ~0049785

Dear BugMaster,

Branch CR26514_1 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
SHA-1: 5c3166471a0af24ed850bec35c613abba0542877

Number of compiler warnings:
occt component:
   Linux: 0 (0 on master)
   Windows: 0 (0 on master)
   MasOS: 134 (134 on master)
products component:
   Linux: 37 (37 on master)
   Windows: 0 (0 on master)

Regressions/Differences:
Not detected

Testing cases:
Not needed

Testing on Linux:
Total MEMORY difference: 90013297 / 89882677 [+0.15%]
Total CPU difference: 19205.690000000155 / 19263.900000000092 [-0.30%]

Testing on Windows:
Total MEMORY difference: 57211616 / 57466619 [-0.44%]
Total CPU difference: 17798.48169209903 / 18535.477216399115 [-3.98%]

git

2016-04-17 13:46

administrator   ~0052943

Branch CR26514 has been deleted by kgv.

SHA-1: b0676397e86784190a179b36f4cc6887dc710d87

git

2016-04-17 13:46

administrator   ~0052944

Branch CR26514_1 has been deleted by kgv.

SHA-1: 5c3166471a0af24ed850bec35c613abba0542877

Related Changesets

occt: master d868695f

2016-01-07 18:15:29

abv


Committer: bugmaster Details Diff
0026514: OSD_Path can not work with French symbols in file name.

Restriction on path to contain only basic ASCII symbols is removed in OSD_Path, to allow paths to contain any symbols (defined in UTF-8 encoding).
Affected Issues
0026514
mod - src/OSD/OSD_Path.cxx Diff File

Issue History

Date Modified Username Field Change
2015-08-03 18:50 vtn New Issue
2015-08-03 18:50 vtn Assigned To => vtn
2015-08-03 20:03 git Note Added: 0043799
2015-08-03 20:05 vtn Assigned To vtn => abv
2015-08-03 20:05 vtn Status new => resolved
2015-08-03 20:05 vtn Steps to Reproduce Updated
2015-08-03 20:55 kgv Relationship added related to 0024716
2015-08-03 20:55 kgv Relationship added related to 0022484
2015-08-03 21:03 kgv Note Added: 0043800
2015-08-04 11:21 git Note Added: 0043801
2015-08-12 10:41 abv Note Added: 0044018
2015-08-12 11:02 abv Assigned To abv => vtn
2015-08-12 11:02 abv Status resolved => assigned
2015-08-24 10:46 vtn Note Added: 0044531
2015-08-24 10:46 vtn Assigned To vtn => abv
2015-08-24 10:46 vtn Status assigned => resolved
2015-08-24 10:59 abv Status resolved => assigned
2015-12-30 11:51 abv Target Version 7.1.0 => 7.0.0
2016-01-07 21:15 git Note Added: 0049716
2016-01-07 21:16 abv Note Added: 0049717
2016-01-07 21:16 abv Assigned To abv => kgv
2016-01-07 21:16 abv Status assigned => resolved
2016-01-08 10:35 kgv Note Added: 0049729
2016-01-08 10:35 kgv Assigned To kgv => bugmaster
2016-01-08 10:35 kgv Status resolved => reviewed
2016-01-11 12:03 apv Assigned To bugmaster => apv
2016-01-12 15:20 apv Test case number => Not needed
2016-01-12 16:05 apv Note Added: 0049785
2016-01-12 16:05 apv Assigned To apv => bugmaster
2016-01-12 16:05 apv Status reviewed => tested
2016-01-15 16:57 bugmaster Changeset attached => occt master d868695f
2016-01-15 16:57 bugmaster Status tested => verified
2016-01-15 16:57 bugmaster Resolution open => fixed
2016-01-21 11:06 adv Relationship added parent of 0027100
2016-04-17 13:46 git Note Added: 0052943
2016-04-17 13:46 git Note Added: 0052944
2016-04-20 15:43 aiv Fixed in Version => 7.0.0
2016-04-20 15:50 aiv Status verified => closed
2017-01-13 20:22 kgv Relationship added related to 0027585